* Re: Passing information from initramfs to real rootfs
2003-11-14 9:43 Passing information from initramfs to real rootfs Hannes Reinecke
@ 2003-11-14 9:47 ` Olaf Hering
2003-11-14 17:42 ` Dave Dodge
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Olaf Hering @ 2003-11-14 9:47 UTC (permalink / raw)
To: linux-hotplug
On Fri, Nov 14, Hannes Reinecke wrote:
> Hi all,
>
> is it possible to get information out of initramfs to be passed to the
> real root fs?
mkdir /foo
mkfs.minix /dev/ram42
mount -nt minix /dev/ram42 /foo
echo my content > /foo/backup.txt
umount /foo
...
mount -n /dev/ram42 /oldinitramfscontent
might work.
--
USB is for mice, FireWire is for men!
sUse lINUX ag, n√úRNBERG
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Passing information from initramfs to real rootfs
2003-11-14 9:43 Passing information from initramfs to real rootfs Hannes Reinecke
2003-11-14 9:47 ` Olaf Hering
@ 2003-11-14 17:42 ` Dave Dodge
2003-11-14 18:44 ` Olaf Hering
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Dave Dodge @ 2003-11-14 17:42 UTC (permalink / raw)
To: linux-hotplug
On Fri, 14 Nov 2003, Hannes Reinecke wrote:
> I'm thinking especially on udev and friends; udev could handle
> hotplug-events during boot-up from initramfs, but the devices generated
> cannot be passed to the real root-device, so essentially we have to
> re-scan sysfs to find and generate all events which might have been
> generated during boot and pass them to udev _again_.
[...]
> Easiest solution would be to have it moved initrd-style to /initramfs or
> somesuch, then we could easily access it und umount it (i.e. free the
> memory) as soon as we're done with the processing.
That's what I was planning to do for my test system. With the current
kernel I basically have to eliminate mount_root anyway in order to
use initramfs at all, so I was going to do the "real" root mount in
userspace and pivot_root to it explicitly.
As far as the initramfs /dev, my plan is to try symlinking or bind
mounting it into the new root, and continue to use the same /dev as
initramfs. If you want to umount and free the initramfs memory then I
guess you'd have to copy the dev contents somehow (unless or until
someone has a way to create a dedicated ramfs for /dev during
initramfs and then remount that at /dev after a pivot_root).
-Dave Dodge
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Passing information from initramfs to real rootfs
2003-11-14 9:43 Passing information from initramfs to real rootfs Hannes Reinecke
2003-11-14 9:47 ` Olaf Hering
2003-11-14 17:42 ` Dave Dodge
@ 2003-11-14 18:44 ` Olaf Hering
2003-11-20 0:01 ` Greg KH
2003-11-20 6:41 ` Olaf Hering
4 siblings, 0 replies; 6+ messages in thread
From: Olaf Hering @ 2003-11-14 18:44 UTC (permalink / raw)
To: linux-hotplug
On Fri, Nov 14, Olaf Hering wrote:
> On Fri, Nov 14, Hannes Reinecke wrote:
>
> > Hi all,
> >
> > is it possible to get information out of initramfs to be passed to the
> > real root fs?
>
> mkdir /foo
> mkfs.minix /dev/ram42
> mount -nt minix /dev/ram42 /foo
> echo my content > /foo/backup.txt
> umount /foo
>
> ...
>
> mount -n /dev/ram42 /oldinitramfscontent
>
>
> might work.
Doesnt work, the ramdisk content disappears during umount. Does anyone
know what it disappears in the initramfs context, but not in the running
system?
--
USB is for mice, FireWire is for men!
sUse lINUX ag, n√úRNBERG
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Passing information from initramfs to real rootfs
2003-11-14 9:43 Passing information from initramfs to real rootfs Hannes Reinecke
` (2 preceding siblings ...)
2003-11-14 18:44 ` Olaf Hering
@ 2003-11-20 0:01 ` Greg KH
2003-11-20 6:41 ` Olaf Hering
4 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2003-11-20 0:01 UTC (permalink / raw)
To: linux-hotplug
On Fri, Nov 14, 2003 at 07:44:09PM +0100, Olaf Hering wrote:
> On Fri, Nov 14, Olaf Hering wrote:
>
> > On Fri, Nov 14, Hannes Reinecke wrote:
> >
> > > Hi all,
> > >
> > > is it possible to get information out of initramfs to be passed to the
> > > real root fs?
> >
> > mkdir /foo
> > mkfs.minix /dev/ram42
> > mount -nt minix /dev/ram42 /foo
> > echo my content > /foo/backup.txt
> > umount /foo
> >
> > ...
> >
> > mount -n /dev/ram42 /oldinitramfscontent
> >
> >
> > might work.
>
> Doesnt work, the ramdisk content disappears during umount. Does anyone
> know what it disappears in the initramfs context, but not in the running
> system?
Why umount it then?
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Passing information from initramfs to real rootfs
2003-11-14 9:43 Passing information from initramfs to real rootfs Hannes Reinecke
` (3 preceding siblings ...)
2003-11-20 0:01 ` Greg KH
@ 2003-11-20 6:41 ` Olaf Hering
4 siblings, 0 replies; 6+ messages in thread
From: Olaf Hering @ 2003-11-20 6:41 UTC (permalink / raw)
To: linux-hotplug
On Wed, Nov 19, Greg KH wrote:
> On Fri, Nov 14, 2003 at 07:44:09PM +0100, Olaf Hering wrote:
> > On Fri, Nov 14, Olaf Hering wrote:
> >
> > > On Fri, Nov 14, Hannes Reinecke wrote:
> > >
> > > > Hi all,
> > > >
> > > > is it possible to get information out of initramfs to be passed to the
> > > > real root fs?
> > >
> > > mkdir /foo
> > > mkfs.minix /dev/ram42
> > > mount -nt minix /dev/ram42 /foo
> > > echo my content > /foo/backup.txt
> > > umount /foo
> > >
> > > ...
> > >
> > > mount -n /dev/ram42 /oldinitramfscontent
> > >
> > >
> > > might work.
> >
> > Doesnt work, the ramdisk content disappears during umount. Does anyone
> > know what it disappears in the initramfs context, but not in the running
> > system?
>
> Why umount it then?
/foo is in initramfs and not accessible after mounting the real root.
But there are ways to preserve the content somehow. It should not
disappear according to viro.
--
USB is for mice, FireWire is for men!
sUse lINUX ag, n√úRNBERG
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread