/dev/. Начиная с версии Debian Squeeze, схема присвоения имён специальным файлам, обозначающих жёсткие диски, стала единообразной в ядре Linux, и все жесткие диски (IDE/PATA, SATA, SCSI, USB, IEEE 1394) сейчас представлены как файлы следующего вида /dev/sd*.
/dev/sda1 - это первый раздел (X=1) на первом диске (x=a), и /dev/sdb3 - это третий раздел (X=3) на следующем (втором) диске (x=b). Таким образом всегда можно определить, какой раздел какому диску соответствует.
/dev/sda5, следующий - /dev/sda6, и т.д.
udev создаёт, в дополнение к /dev/sd*, ещё и символические ссылки с фиксированными именами, которые вы можете использовать если захотите идентифицировать жесткий диск в явной, недвусмысленной, манере. Эти символические ссылки располагаются в /dev/disk/by-id. На машине с двумя жесткими дисками, например, они могут быть найдены следующим образом:
mirexpress:/dev/disk/by-id#ls -ltotal 0 lrwxrwxrwx 1 root root 9 23 jul. 08:58 ata-STM3500418AS_9VM3L3KP -> ../../sda lrwxrwxrwx 1 root root 10 23 jul. 08:58 ata-STM3500418AS_9VM3L3KP-part1 -> ../../sda1 lrwxrwxrwx 1 root root 10 23 jul. 08:58 ata-STM3500418AS_9VM3L3KP-part2 -> ../../sda2 [....] lrwxrwxrwx 1 root root 9 23 jul. 08:58 ata-WDC_WD5001AALS-00L3B2_WD-WCAT00241697 -> ../../sdb lrwxrwxrwx 1 root root 10 23 jul. 08:58 ata-WDC_WD5001AALS-00L3B2_WD-WCAT00241697-part1 -> ../../sdb1 lrwxrwxrwx 1 root root 10 23 jul. 08:58 ata-WDC_WD5001AALS-00L3B2_WD-WCAT00241697-part2 -> ../../sdb2 [...] lrwxrwxrwx 1 root root 9 23 jul. 08:58 scsi-SATA_STM3500418AS_9VM3L3KP -> ../../sda lrwxrwxrwx 1 root root 10 23 jul. 08:58 scsi-SATA_STM3500418AS_9VM3L3KP-part1 -> ../../sda1 lrwxrwxrwx 1 root root 10 23 jul. 08:58 scsi-SATA_STM3500418AS_9VM3L3KP-part2 -> ../../sda2 [...] lrwxrwxrwx 1 root root 9 23 jul. 08:58 scsi-SATA_WDC_WD5001AALS-_WD-WCAT00241697 -> ../../sdb lrwxrwxrwx 1 root root 10 23 jul. 08:58 scsi-SATA_WDC_WD5001AALS-_WD-WCAT00241697-part1 -> ../../sdb1 lrwxrwxrwx 1 root root 10 23 jul. 08:58 scsi-SATA_WDC_WD5001AALS-_WD-WCAT00241697-part2 -> ../../sdb2 [...] lrwxrwxrwx 1 root root 9 23 jul. 16:48 usb-LaCie_iamaKey_3ed00e26ccc11a-0:0 -> ../../sdc lrwxrwxrwx 1 root root 10 23 jul. 16:48 usb-LaCie_iamaKey_3ed00e26ccc11a-0:0-part1 -> ../../sdc1 lrwxrwxrwx 1 root root 10 23 jul. 16:48 usb-LaCie_iamaKey_3ed00e26ccc11a-0:0-part2 -> ../../sdc2 [...] lrwxrwxrwx 1 root root 9 23 jul. 08:58 wwn-0x5000c50015c4842f -> ../../sda lrwxrwxrwx 1 root root 10 23 jul. 08:58 wwn-0x5000c50015c4842f-part1 -> ../../sda1 [...] mirexpress:/dev/disk/by-id#
lilo. За свою забывчивость можно расплатиться невозможностью загрузить систему (с того раздела, где были выполнены изменения, но не уведомили LILO об этом). Например, если старое ядро было удалено или перезаписано как новое с тем же именем (например было скомпилировано новое изменённое ядро с тем же именем), а обновление LILO не было выполнено, то при загрузке будет выдана ошибка, что LILO не может найти ядра (в том месте жёсткого диска, где она его ожидала увидеть).
/etc/lilo.conf, Ниже приведен пример простого файла для стандартной конфигурации.
Пример 8.4. Файл настройки LILO
# The disk on which LILO should be installed. # By indicating the disk and not a partition. # you order LILO to be installed on the MBR. boot=/dev/sda # the partition that contains Debian root=/dev/sda2 # the item to be loaded by default default=Linux # the most recent kernel image image=/vmlinuz label=Linux initrd=/initrd.img read-only # Old kernel (if the newly installed kernel doesn't boot) image=/vmlinuz.old label=LinuxOLD initrd=/initrd.img.old read-only optional # only for Linux/Windows dual boot other=/dev/sda1 label=Windows
grub-install /dev/sda.
/boot/grub/grub.cfg, but this file (in Debian) is generated from others. Be careful not to modify it by hand, since such local modifications will be lost the next time update-grub is run (which may occur upon update of various packages). The most common modifications of the /boot/grub/grub.cfg file (to add command line parameters to the kernel or change the duration that the menu is displayed, for example) are made through the variables in /etc/default/grub. To add entries to the menu, you can either create a /boot/grub/custom.cfg file or modify the /etc/grub.d/40_custom file. For more complex configurations, you can modify other files in /etc/grub.d, or add to them; these scripts should return configuration snippets, possibly by making use of external programs. These scripts are the ones that will update the list of kernels to boot: 10_linux takes into consideration the installed Linux kernels; 20_linux_xen takes into account Xen virtual systems, and 30_os-prober lists other operating systems (Windows, OS X, Hurd).
ybin устанавливает загрузчик yaboot и размещает там его файлы настройки (и дублирует их). Если файл /etc/yaboot.conf будет изменён, то вам нужно будет только запустить эту команду снова (а благодаря дубликату, yaboot всегда знает, как найти месторасположение ядра на диске).
ybin, вы должны вначале убедиться, что имеете правильно составленный файл /etc/yaboot.conf. В следующем примере приводится минимальная конфигурация данного файла.
Пример 8.5. Файл настройки Yaboot
# bootstrap partition
boot=/dev/sda2
# the disk
device=hd:
# the Linux partition
partition=3
root=/dev/sda3
# boot after 3 seconds of inactivity
# (timeout is in tenths of seconds)
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
enablecdboot
# last kernel installed
image=/vmlinux
label=linux
initrd=/initrd.img
read-only
# old kernel
image=/vmlinux.old
label=old
initrd=/initrd.img.old
read-only
# only for Linux/Mac OSX dual-boot
macosx=/dev/sda5
# bsd=/dev/sdaX and macos=/dev/sdaX
# are also possible