Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Grub boots to command prompt
Date: Fri, 25 Dec 2009 12:13:04
Message-Id: 200912251239.18214.alan.mckinnon@gmail.com
In Reply to: Re: [gentoo-user] Grub boots to command prompt by Daniel D Jones
1 On Thursday 24 December 2009 18:32:22 Daniel D Jones wrote:
2 > > Your next paragraph indicates that (hd0,0) is not in fact root, but (what
3 > > will eventually be) /boot.
4 > >
5 > > Your root is likely to be (hd0,2)
6 >
7 > Eh? Your grub root should be where grub is installed, shouldn't
8 > it? That's /dev/sda1 on my system, which grub sees as hd (0,0). When
9 > the file system is mounted, that partition mounted under /boot but grub
10 > still needs to know where to find the menu.lst and various stage files on
11 > initial boot, and that's hd (0,0).
12 >
13
14 grub doesn't have a concept of "root". It's a bootloader, not a OS, and
15 doesn't mount anything. It just reads data directly off disk volumes and
16 (sometimes) has drivers to interpret the raw data.
17
18 When you say "root" that can only make sense in the context of an OS that uses
19 a "root", so I interpreted it as such.
20
21 grub is installed wherever you installed it. You can put it on any arbitrary
22 drive you feel like, or even in the first sector of any arbitrary partition if
23 the drive supports such. All you have to do is tell grub where it is.
24
25 Now, that introduces a wrinkle. On a PC, the BIOS does not support stage 1
26 booting off a partition. The stage 1 code MUST exist on the MBR of a DRIVE
27 (blame msdos for this stupid idea) so you want to install grub to /dev/sda or
28 (hd0)
29
30 I strongly suspect that you are conflating the operation of a bootloader with
31 the OS. At boot time Linux conventions have no relevance whatsoever and are
32 not valid, as Linux is not running yet. grub Boots Linux, it is not Linux and
33 does not work like Linux. Much the same way as a starter motor starts a petrol
34 engine but a starter motor is not a petrol engine and does not work like one.
35
36
37 --
38 alan dot mckinnon at gmail dot com