mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* initrd and devfs
@ 2002-04-29  8:46 Keith Owens
  2002-04-29  9:13 ` Pozsar Balazs
  2002-05-05  2:48 ` Keith Owens
  0 siblings, 2 replies; 3+ messages in thread
From: Keith Owens @ 2002-04-29  8:46 UTC (permalink / raw)
  To: linux-kernel

I am having problems with the combination of initrd and devfs.

mkinitrd 3.3.9, hacked to build an ia64 initrd on ia32.
Kernel 2.4.18-ia64-020410, config extract.

CONFIG_DEVFS_FS=y
CONFIG_DEVFS_MOUNT=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_BLK_DEV_INITRD=y

linuxrc commands:

insmod /lib/qla1280.o
echo Mounting /proc filesystem
mount -t proc /proc /proc
echo Creating root device
mkrootdev /dev/root
  fails "mkrootdev: mknod failed: 17".  devfs has already created
  /dev/root as a symlink.
echo 0x0100 > /proc/sys/kernel/real-root-dev
echo Mounting root filesystem
mount --ro -t ext2 /dev/root /sysroot
  fails "mount: error 16 mounting ext2" because /dev/root is wrong.
pivot_root /sysroot /sysroot/initrd
  fails "pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2"

By removing /dev/root immediately before mkrootdev /dev/root I can get
past those errors, even pivot_root works.  But then it gets nasty :-

INIT: version 2.78 booting
                        Welcome to Red Hat Linux
                Press 'I' to enter interactive startup.
Mounting proc filesystem:  [  OK  ]
Unmounting initrd:  umount: /initrd: device is busy
  Because of this mount - none /initrd/dev devfs rw 0 0

If I boot with initrd and devfs=nomount it goes through initrd
processing and successfully umounts initrd, but then fails "Remounting
root filesystem in read-write mode: mount: no such partition found".
/proc/mounts contains

  /dev/root / ext2 ro 0 0

What is the correct way of using initrd and devfs together?

devfsd.conf is not the answer, initrd does not run the devfsd daemon.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: initrd and devfs
  2002-04-29  8:46 initrd and devfs Keith Owens
@ 2002-04-29  9:13 ` Pozsar Balazs
  2002-05-05  2:48 ` Keith Owens
  1 sibling, 0 replies; 3+ messages in thread
From: Pozsar Balazs @ 2002-04-29  9:13 UTC (permalink / raw)
  To: Keith Owens; +Cc: linux-kernel


I'm not absolutely sure that this is what you want, but I think I have a
similar case.
I boot from a CD a kernel which has cdrom support compiled as modules, and
devfs compiled in:

syslinux starts kernel with this:
 /boot/bzImage devfs=mount root=/dev/cdroms/cdrom0 initrd=/boot/initrd

Then the initrd loads the needed modules, and _exits_.
The kernel then mounts the given root, and the system boots successfully.

So all I needed to do is give the root partition as a parameter, and no
mkrootdev or pivot_root was needed.

-- 
Balazs Pozsar

On Mon, 29 Apr 2002, Keith Owens wrote:

> I am having problems with the combination of initrd and devfs.
>
> mkinitrd 3.3.9, hacked to build an ia64 initrd on ia32.
> Kernel 2.4.18-ia64-020410, config extract.
>
> CONFIG_DEVFS_FS=y
> CONFIG_DEVFS_MOUNT=y
> CONFIG_BLK_DEV_RAM=y
> CONFIG_BLK_DEV_RAM_SIZE=8192
> CONFIG_BLK_DEV_INITRD=y
>
> linuxrc commands:
>
> insmod /lib/qla1280.o
> echo Mounting /proc filesystem
> mount -t proc /proc /proc
> echo Creating root device
> mkrootdev /dev/root
>   fails "mkrootdev: mknod failed: 17".  devfs has already created
>   /dev/root as a symlink.
> echo 0x0100 > /proc/sys/kernel/real-root-dev
> echo Mounting root filesystem
> mount --ro -t ext2 /dev/root /sysroot
>   fails "mount: error 16 mounting ext2" because /dev/root is wrong.
> pivot_root /sysroot /sysroot/initrd
>   fails "pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2"
>
> By removing /dev/root immediately before mkrootdev /dev/root I can get
> past those errors, even pivot_root works.  But then it gets nasty :-
>
> INIT: version 2.78 booting
>                         Welcome to Red Hat Linux
>                 Press 'I' to enter interactive startup.
> Mounting proc filesystem:  [  OK  ]
> Unmounting initrd:  umount: /initrd: device is busy
>   Because of this mount - none /initrd/dev devfs rw 0 0
>
> If I boot with initrd and devfs=nomount it goes through initrd
> processing and successfully umounts initrd, but then fails "Remounting
> root filesystem in read-write mode: mount: no such partition found".
> /proc/mounts contains
>
>   /dev/root / ext2 ro 0 0
>
> What is the correct way of using initrd and devfs together?
>
> devfsd.conf is not the answer, initrd does not run the devfsd daemon.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: initrd and devfs
  2002-04-29  8:46 initrd and devfs Keith Owens
  2002-04-29  9:13 ` Pozsar Balazs
@ 2002-05-05  2:48 ` Keith Owens
  1 sibling, 0 replies; 3+ messages in thread
From: Keith Owens @ 2002-05-05  2:48 UTC (permalink / raw)
  To: linux-kernel

Resend, no response from initrd/devfs maintainers the first time.

I am having problems with the combination of initrd and devfs.

mkinitrd 3.3.9, hacked to build an ia64 initrd on ia32.
Kernel 2.4.18-ia64-020410, config extract.

CONFIG_DEVFS_FS=y
CONFIG_DEVFS_MOUNT=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_BLK_DEV_INITRD=y

linuxrc commands:

insmod /lib/qla1280.o
echo Mounting /proc filesystem
mount -t proc /proc /proc
echo Creating root device
mkrootdev /dev/root
  fails "mkrootdev: mknod failed: 17".  devfs has already created
  /dev/root as a symlink.
echo 0x0100 > /proc/sys/kernel/real-root-dev
echo Mounting root filesystem
mount --ro -t ext2 /dev/root /sysroot
  fails "mount: error 16 mounting ext2" because /dev/root is wrong.
pivot_root /sysroot /sysroot/initrd
  fails "pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2"

By removing /dev/root immediately before mkrootdev /dev/root I can get
past those errors, even pivot_root works.  But then it gets nasty :-

INIT: version 2.78 booting
                        Welcome to Red Hat Linux
                Press 'I' to enter interactive startup.
Mounting proc filesystem:  [  OK  ]
Unmounting initrd:  umount: /initrd: device is busy
  Because of this mount - none /initrd/dev devfs rw 0 0

If I boot with initrd and devfs=nomount it goes through initrd
processing and successfully umounts initrd, but then fails "Remounting
root filesystem in read-write mode: mount: no such partition found".
/proc/mounts contains

  /dev/root / ext2 ro 0 0

What is the correct way of using initrd and devfs together?

devfsd.conf is not the answer, initrd does not run the devfsd daemon.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-05-05  2:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-29  8:46 initrd and devfs Keith Owens
2002-04-29  9:13 ` Pozsar Balazs
2002-05-05  2:48 ` Keith Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®