Gentoo Archives: gentoo-user

From: darren kirby <bulliver@×××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Grub heartbreaker
Date: Thu, 24 Apr 2008 20:02:40
Message-Id: 200804241401.17271.bulliver@badcomputer.org
In Reply to: Re: [gentoo-user] Grub heartbreaker by John covici
1 quoth the John covici:
2 > on Thursday 04/24/2008 Alan McKinnon(alan.mckinnon@×××××.com) wrote
3 >
4 > > On Thursday 24 April 2008, reader@×××××××.com wrote:
5 > > > So assuming I've made some mistake in grub.conf I try to boot from
6 > > > grub command line.
7 > > >
8 > > > root = (hd0,0) (which is /dev/sda1 in linux terms)
9 > > >
10 > > > kernel /kernel-2.6.25-r1
11 > >
12 > > Nope. Kernel needs a root=<device> parameter. It can't know what is your
13 > > root partition, that info is in fstab and fstab is on the root
14 > > partition.So you tell it via a parameter
15 > >
16 > > > boot
17 > > >
18 > > > But it fails with a message saying please append a working root=?? to
19 > > > the boot commands.
20 > >
21 > > expected result. see above.
22 > >
23 > > > So reloading the install ISO I mount /mnt/gentoo/boot and edit
24 > > > grub.conf to say:
25 > > >
26 > > > title=kernel-2.6.25-r1
27 > > > root (hd0,0)
28 > > > kernel /kernel-2.6.25-r1 root=/dev/sda3
29 > > >
30 > > > That fails
31 > > > kernel /kernel-2.6.25-r1 root=/dev/hda3 (Thinking maybe grub
32 > > > does not understand sda)
33 > >
34 > > Nothing to do with grub. It's a kernel boot parameter passed verbatim to
35 > > the kernel and needs valid kernel device names.
36 > >
37 > > What's the error you get? Is (hd0,0) a separate /boot? Does it contain a
38 > > file called kernel-2.6.25-r1 at the top level? And you also should have
39 > > a "ro" kernel parameter in there
40 > >
41 > > > That Fails
42 > > >
43 > > > kernel /kernel-2.6.25-r1 root=(hd0)/sda3
44 > > >
45 > > > Fails
46 > >
47 > > Won't work. (hd0) is a grub thing. You need a /dev/sda3 or similar in
48 > > there
49 > >
50 > > > I've even tried:
51 > > > kernel /kernel-2.6.25-r1 root=(hd0,2)
52 > >
53 > > Won't work. Same reason.
54 > >
55 > > > And another failure... all with the same message about appending a
56 > > > working `root=???'
57 > > >
58 > > > I'm about out of ideas here.
59 > >
60 > > here's a working grub.conf for illustration:
61 > >
62 > > default 0
63 > > timeout 10
64 > > splashimage=(hd0,0)/grub/splash.xpm.gz
65 > >
66 > > title Default
67 > > root (hd0,0)
68 > > kernel /vmlinuz root=/dev/sda3 ro
69 > >
70 > > title Gentoo-2.6.25
71 > > root (hd0,0)
72 > > kernel /vmlinuz-2.6.25-gentoo root=/dev/sda3 ro
73 > >
74 > > Seems my setup is identical to yours:
75 > > /boot on /dev/sda1 aka (hd0,0) to grub
76 > > / on /dev/sda3
77 > >
78 > > Only difference is the "ro" boot parameter, which shouldn't make a
79 > > difference - it's there for fsck purposes during start-up.
80 > >
81 > > What disk driver and disks do you have? Are you 100% sure you are either
82 > > using the new ata driver (everything is an sd) or have scsi/sata disks?
83 > > If your disk is IDE with the old driver, it will be an hd and will
84 > > require that on the kernel line
85 >
86 > Well, I had to put a lot more parameters for it to work -- I am not
87 > using grub but my parameters aside from the ro are
88 > init=/linuxrc ramdisk=8192 real_root=/dev/sda2 udev
89 > and some more specific to me. I am using something close to the
90 > original gentoo configs, so it uses an initrd parameter also which you
91 > need separately in grub.
92
93 That would only apply if in fact the OP is using an initrd, which does not
94 appear to be the case, though, the OP may have simply omitted this info.
95
96 Rather, as Alan mentioned, it seems the problem is that the kernel doesn't
97 agree that /dev/sda3 is the '/' filesystem. I have never used vmware, perhaps
98 it fudges device paths in some way?
99
100 > Hope this helps.
101 >
102 > --
103 > Your life is like a penny. You're going to lose it. The question is:
104 > How do
105 > you spend it?
106 >
107 > John Covici
108 > covici@××××××××××.com
109
110 -d
111 --
112 darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
113 "...the number of UNIX installations has grown to 10, with more expected..."
114 - Dennis Ritchie and Ken Thompson, June 1972
115 --
116 gentoo-user@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Grub heartbreaker Alan McKinnon <alan.mckinnon@×××××.com>