/dev/
, per questo scopo. Sin da Debian Squeeze, lo schema dei nomi degli dischi è stato unificato con il kernel Linux, e tutti i dischi rigidi (IDE/PATA, SATA, SCSI, USB, IEEE 1394) sono ora rappresentati da /dev/sd*
.
/dev/sda1
è la prima partizione nel primo disco e /dev/sdb3
è la terza partizione nel secondo disco.
/dev/sda5
, seguita da /dev/sda6
, etc.
udev
crea in aggiunta a /dev/sd*
dei collegamenti simbolici con un nome fisso che è possibile usare se si desidera identificare un disco rigido in modo non ambiguo. Questi collegamenti simbolici sono conservati in /dev/disk/by-id
. In una macchina con due dischi fisici, per esempio, si potrebbe trovare questo:
mirexpress:/dev/disk/by-id#
ls -l
total 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
. Dimenticarsi di farlo impedisce al sistema di avviarsi se il vecchio kernel è stato rimosso o sostituito dato che quello nuovo non sarà nella stessa posizione sul disco.
/etc/lilo.conf
: un file semplice per configurazioni standard è presentato nell'esempio che segue.
Esempio 8.4. File di configurazione di LILO
# Il disco dove LILO dev'essere installato. # Indicando il disco e non la partizione. # ordiniamo a LILO di installarsi nell'MBR. boot=/dev/sda # la partizione che contiene Debian root=/dev/sda2 # l'oggetto da caricare in via predefinita default=Linux # la più recente immagine kernel image=/vmlinuz label=Linux initrd=/initrd.img read-only # Vecchio kernel (in caso il nuovo kernel non parta) image=/vmlinuz.old label=LinuxOLD initrd=/initrd.img.old read-only optional # solo per il doppio avvio Linux/Windows 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).