Gentoo Archives: gentoo-user

From: John covici <covici@××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Grub heartbreaker
Date: Thu, 24 Apr 2008 19:50:20
Message-Id: 18448.58443.903633.986436@ccs.covici.com
In Reply to: Re: [gentoo-user] Grub heartbreaker by Alan McKinnon
1 on Thursday 04/24/2008 Alan McKinnon(alan.mckinnon@×××××.com) wrote
2 > On Thursday 24 April 2008, reader@×××××××.com wrote:
3 >
4 > > So assuming I've made some mistake in grub.conf I try to boot from
5 > > grub command line.
6 > >
7 > > root = (hd0,0) (which is /dev/sda1 in linux terms)
8 > >
9 > > kernel /kernel-2.6.25-r1
10 >
11 > Nope. Kernel needs a root=<device> parameter. It can't know what is your
12 > root partition, that info is in fstab and fstab is on the root
13 > partition.So you tell it via a parameter
14 >
15 > > boot
16 > >
17 > > But it fails with a message saying please append a working root=?? to
18 > > the boot commands.
19 >
20 > expected result. see above.
21 >
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
87 Well, I had to put a lot more parameters for it to work -- I am not
88 using grub but my parameters aside from the ro are
89 init=/linuxrc ramdisk=8192 real_root=/dev/sda2 udev
90 and some more specific to me. I am using something close to the
91 original gentoo configs, so it uses an initrd parameter also which you
92 need separately in grub.
93
94 Hope this helps.
95
96 --
97 Your life is like a penny. You're going to lose it. The question is:
98 How do
99 you spend it?
100
101 John Covici
102 covici@××××××××××.com
103 --
104 gentoo-user@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Grub heartbreaker darren kirby <bulliver@×××××××××××.org>