LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Which came first...the chicken of the egg? (https://www.linuxquestions.org/questions/linux-newbie-8/which-came-first-the-chicken-of-the-egg-18417/)

ugenn 04-13-2002 07:24 AM

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?

Thymox 04-13-2002 08:02 AM

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.

ugenn 04-13-2002 09:06 AM

Quote:

Originally posted by Thymox
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.
Yeah, but that's not really addressing the issue. How does it make sense of /dev/hda1 when / itself isn't mounted yet?

Thymox 04-13-2002 09:17 AM

/ 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.