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

Re: Disk File's



In 29 Oct 2000 11:46:55 +0100 Goswin Brederlow <goswin.brederlow@student.uni-tuebingen.de> cum veritate scripsit :

> Daniel Burrows <Daniel_Burrows@brown.edu> writes:
> 
> > On Wed, Oct 18, 2000 at 10:56:57AM +0900, Junichi Uekawa <dancer@netfort.gr.jp> was heard to say:
> > > The hard part is booting the kernel. I can't think up on a way of booting a kernel on
> > > a loopback device.
> > 
> >   It feels like you should (?) be able to do this with some sort of initrd
> > trick.  I was actualy experimenting with this (not really for booting from
> > Windows, mainly just for my own amusement) but never got it really working..

Ah, I've created a CDROM image that does this.
It does chroot. 
I have modified the boot floppies to do this, and I am experimenting with it now.
It's really cool to have a bootable CD-Rom. No need to worry too
much about space.

I have an ISO image of a bootable CD-Rom that just dumps an ext2 image file
in "c:\unstable.ext", and starts from there.
Would anyone want it ? It's 50Megs (... it does include woody+build-essential gzipped
so it's rather big.)

The essential part is I overwrote /sbin/dbootstrap with a shell script : 

... start of /sbin/dbootstrap

#!/bin/sh

# Bootable Debian CDROM/floppy -- chroots.
# 2000 October 19 
# Copyright 2000 Junichi Uekawa
# refer to GPL version 2 or later for license.

ISOIMAGEPATH=/target
HOMEDRIVEPATH=/target/install

echo -n "Please give me your CDROM-drive path [/dev/hdc] :"
read CDROMDRIVE
echo -n "Please give me your Windows drive path [/dev/hda1] :"
read HOMEDRIVE

mount $CDROMDRIVE $ISOIMAGEPATH -o ro
mount $HOMEDRIVE $HOMEDRIVEPATH
test -f $HOMEDRIVEPATH/unstable.ext2 || zcat $ISOIMAGEPATH/unstable.ext2.gz > $H
OMEDRIVEPATH/unstable.ext2
mount $HOMEDRIVEPATH/unstable.ext2 /instmnt -o loop
chroot /instmnt bin/bash
# this should be "sbin/init", but I can't care less...

... end of /sbin/bootstrap


and have a filesystem like

/cdrom/boot.catalog <-- created by mkisofs
/cdrom/install
/cdrom/install/rescue.bin <-- this is the 2.88 boot image.
/cdrom/unstable.ext2.gz   <-- ext2fs image gzipped.

in your CDROM.

Would anyone want to get my iso? I'm still working on it.

> My demofs (to be published when 2.4 comes out) does exactly
> that. Actaulyl it is realy simple to do:
> 
> - boot with initrd
> - mount /proc
> - mount /dev/<disk with loobpack file> /mnt
> - losetup /dev/loop0 /mnt/<file>
> - echo 0x700 >/proc/sys/kernel/real-root-dev
> - exit
> 
> I also have some patches for the bootfloppies to use this little trick
> to start the newly installed system without reboot. I just hope they
> take it.


regards,
	junichi

--
University: ti0113@mail4.doshisha.ac.jp    Netfort: dancer@netfort.gr.jp
dancer, a.k.a. Junichi Uekawa   http://www.netfort.gr.jp/~dancer
 Dept. of Knowledge Engineering and Computer Science, Doshisha University.
... Long Live Free Software, LIBERTAS OMNI VINCIT.



Reply to: