Which came first...the chicken or the egg?
When loading the kernel thru lilo or loadlin,
one of the parameters is the device path of where to mount root (eg /dev/hda1). Question is, how does it make sense of the file path since the file system does not exist yet and all it understands is raw sectors? |
My guess is that it takes a peek at the partition table and decides where hda1 would be. It works well, though: my partition table is a mess, I had hda3 as the 15th partition on the disk, and yet lilo still managed to boot QNX ok.
|
Quote:
|
/ doesn't have to be mounted. /dev/hda1 is a device, and although Linux treats everything as a file, that doesn't mean that anthing has to be mounted in order for the device to exist. Take this fine example:
You have multiple distros on your harddisk (say, Mandy and Slack); you're running Slack at the moment; you can see that there is a partition called /dev/hda9, but you can't get to the information on it because it's not mounted. Does this mean that hda9 doesn't exist? Because the harddisk is physically present, and has been recognised by the BIOS, there will be a partition table availble to the program (lilo or loadlin in this case). What the program chooses to do with the information it gains from the partition table is another story. |
All times are GMT -5. The time now is 11:33 AM. |