HardDisksManagement: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 15: | Line 15: | ||
... | ... | ||
</pre> | </pre> | ||
Defining DISK_BOOT_DEV is important because it might be used in some filesystem layouts to define the name of the root partition. An example illustrating this can be found in site/filesystems/classic_single_root : | This fragment of PAN code shows that even if the boot disk is not defined explicitly, an educated guess is made by choosing the first disk. Defining DISK_BOOT_DEV is important because it might be used in some filesystem layouts to define the name of the root partition. An example illustrating this can be found in site/filesystems/classic_single_root : | ||
<pre> | <pre> | ||
variable DISK_BOOT_PARTS = list('root'); | variable DISK_BOOT_PARTS = list('root'); |
Revision as of 16:55, 19 October 2015
How to define the disk layout of a machine
The template to edit is config/filesystems.
Specifying the disk that will used to boot the machine
The path is :
/hardware/harddisks/<harddisk_name>/boot
It is a boolean that is used to define the value of DISK_BOOT_DEV. Have a look at the code of the template site/filesystems/layout :
... variable DISK_BOOT_DEV ?= boot_disk(); variable DISK_BOOT_DEV ?= { if (exists('/hardware/harddisks/sda')) { return('sda'); ...
This fragment of PAN code shows that even if the boot disk is not defined explicitly, an educated guess is made by choosing the first disk. Defining DISK_BOOT_DEV is important because it might be used in some filesystem layouts to define the name of the root partition. An example illustrating this can be found in site/filesystems/classic_single_root :
variable DISK_BOOT_PARTS = list('root'); variable DISK_VOLUME_PARAMS = { t = dict(); t['root'] = dict('size', -1, 'mountpoint', '/', 'type', 'partition', 'device', DISK_BOOT_DEV+to_string(index('root',DISK_BOOT_PARTS)+1)); t; };
In this example, if DISK_BOOT_DEV is 'sda', then the name of the device of the root partition will be 'sda1'.