Re: grub root=/dev/hd$v$n not root=LABEL=/ why

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > root=LABEL=/
>
> From: Ravi <kravi26 () yahoo ! com>
> ...
> More precisely, this is implemented in nash - the
> shell RedHat uses to execute linuxrc in the initrd
> image.

Link!  Thank you.  I see `man nash` mentions "LABEL=",
just as `man fstab` and `man mkinitrd` did.

> shell on the initrd image

How do I discover what shell I am using to interpret
my linuxrc?

> From: Jan Hudec <bulb () ucw ! cz>
> ...
> cramfs images ...
> should be possible to mount them on loopback.

Elaborate please?  I see:

$ sudo mount /boot/initrd-2.4.20-pel.img /mnt/loop0 -o
loop=/dev/loop0
mount: you must specify the filesystem type
$
$ sudo mount /boot/initrd-2.4.20-pel.img /mnt/loop0 -t
cramfs -o loop=/dev/loop0
mount: wrong fs type, bad option, bad superblock on
/dev/loop0,
       or too many mounted file systems
$

Yet I see I can mount cramfs on loopback:

$ dd if=/dev/zero of=cramfs.bin bs=1M count=100
100+0 records in
100+0 records out
$ sudo /sbin/losetup /dev/loop0 cramfs.bin
$ sudo /sbin/mkfs -t cramfs ~/bin /dev/loop0
warning: gids truncated to 8 bits.  (This may be a
security concern.)
$ sudo /sbin/losetup -d /dev/loop0
$
$ sudo mount cramfs.bin /mnt/loop0 -o loop=/dev/loop0
$ ls /mnt/loop0
was.in.bin
$ sudo umount /mnt/loop0
$
$ ls ~/bin
was.in.bin
$

> > One option is to just give the right device for
> > root, ...
>
> From: Jan Hudec <bulb () ucw ! cz>
> ...
> The first says to give correct device - eg.
> /dev/hda2 - that does not happen here.

Agreed.

> > another is to add a patch (posted to l-k ...
> > years ago) which added kernel support for this,
> > and
>
> The second says there should be a patch - it is
> not in the mainline kernel (it would work
> otherwise) and it's not in RedHat kernel only
> (mainline kernel would not work with RedHat setup).

Lost me sorry.

I can accept on your authority that I don't need a
patch, but I don't yet see how you discovered that.

After considerable study, I tentatively conclude, here
we mean to be arguing specifically from the evidence
of having made a kernel from kernel.org with a .config
from Red Hat and then seeing that kernel boot with
root=LABEL=/ no worries, for example:

title Red Hat Linux (2.4.21-rh-pel)
        root (hd0,0)
        kernel /vmlinuz-2.4.21-rh-pel ro root=LABEL=/
        initrd /initrd-2.4.21-rh-pel.img

Since the defconfig fails and the Red Hat config
works, I figure there is some minimal change to the
.config that matters.  As yet I have no idea what we
think that minimal change might be.

> > So only one option remains,
> > thus it is obviously true.

I of course agree that, once we establish that we face
only three possible options, if we exclude two, then
the third is true.

> > I remembering seeing a friend stumble across how
> > `make install` calls mkinitrd, I'll try to
> > rediscover that.
>
> From: Jan Hudec <bulb () ucw ! cz>
> ...
> make install has only one way - via the
> /sbin/installkernel script.

Great hint, thanks.  Now in 2.5.73 I notice:

$ make help | tr -s '[:blank:]' ' '
...
 Architecture specific targets (i386):
...
 install - Install kernel using
 (your) ~/bin/installkernel or
 (distribution) /sbin/installkernel or
 install to $(INSTALL_PATH) and run lilo
...
$

Back in 2.4.20 I see:

$ grep mkinitrd /sbin/installkernel
/sbin/new-kernel-pkg -v --mkinitrd --depmod --install
$KERNEL_VERSION
$

Possibly that -v in /sbin/installkernel I added myself
in a past life.  Because of that -v, I see:

# make install
...
creating initrd /boot/initrd-2.4.20-pel.img using
2.4.20-pel
...
#

I think that "creating ..." claim from
/sbin/new-kernel-pkg says I then executed the command:

/sbin/mkinitrd -f /boot/initrd-2.4.20-pel.img
2.4.20-pel

Adding -v to that /sbin/mkinitrd invocation yields:

Using modules:
Using loopback device /dev/loop0
/sbin/nash -> /tmp/initrd.CKgyYL/bin/nash
/sbin/insmod.static -> /tmp/initrd.CKgyYL/bin/insmod

To me this also suggested `man nash`.

Pat LaVarre


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux