HardDisksManagement: Difference between revisions
Jump to navigation
Jump to search
(Created page with "= Specifying the disk that will used to boot the machine = The path is : <pre> /hardware/harddisks/<harddisk_name>/boot </pre> It is a boolean that is used to define the value...") |
|||
Line 13: | Line 13: | ||
... | ... | ||
</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 : | |||
<pre> | |||
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; | |||
}; | |||
</pre> | |||
In this example, if DISK_BOOT_DEV is 'sda', then the name of the device of the root partition will be 'sda1'. |
Revision as of 16:49, 19 October 2015
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'); ...
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'.