From: Peter <pe...@ri...> - 2004-05-05 03:00:51
|
Paul. Thanks for the heads up on the 'offset' mount option. That was = just what I needed to know. Here is a precis of my install process. I = hope it works for you. I suspect the initrd UML boot method is robust = enough to install most any Linux distro (with the hypothesis being = tested on Debian and Whitebox Linux to date). # grab the boodisk image, and extract the initrd.img file wget = ftp://mirror.physics.ncsu.edu/pub/whitebox/3.0/en/os/i386/images/bootdisk= .img mkdir bootdisk mount bootdisk.img bootdisk # create a non-formatted file system. The installer will go and = partition this. dd if=3D/dev/zero bs=3D1k count=3D1 seek=3D$[4*1024*1024] of=3Drootfs ./linux mem=3D256M fakehd fake_ide ubd0=3Drootfs con0=3Dfd:0,fd:1 = root=3D6201 ubd=3D3 \ ramdisk_size=3D16384 con1=3Dpts con2=3Dpts con3=3Dpts con4=3Dpts = con5=3Dpts eth0=3Dtuntap,tap7 initrd=3Dbootdisk/initrd.img Note, I'm using tuntap for my eth0. You use whatever you use. You should be in the installer now... Set your IP info. Use this info for the FTP location of the RPMs: mirror.physics.ncsu.edu /pub/whitebox/3.0/en/os/i386/ Go with the default partitioning. I tried with just a single / = partition and a few other combinations. But I ran into problems when = the installer got to the meaty bit of actually installing rpms. Selected lilo boot loader (you can skip but I believe the rpms then = won't install after you select them). It should run through downloading/installing rpms. Happens rather = quickly on my 100Mbps connection. It will then reboot into the installer (again). Kill the UML instance. Figure out the block offsets per "sfdisk -l -uB rootfs". e.g. with = 16*1024 gets the /boot partition, and 102400*1024 gets the / partition. Device Boot Start End #blocks Id System rootfs.ext3p1 * 16 102399 102384 83 Linux rootfs.ext3p2 102400 3670015 3567616 83 Linux rootfs.ext3p3 3670016 4194303 524288 82 Linux swap rootfs.ext3p4 0 - 0 0 Empty # mount the / partition mount -t ext3 -o loop,offset=3D104857600 rootfs.ext3 tmp/ # create a 'regular' ubd device for your 'proper' file system dd if=3D/dev/zero bs=3D1k count=3D1 seek=3D$[4*1024*1024] of=3Dwbl mkfs.ext3 wbl mkdir tmp2 mount -t ext3 -o loop wbl tmp2 Then copy the files/directories from the root partition from the rootfs = into the wbl file system. I have a script for that. If people need it, = let me know. I'm excluding it here to keep this bit concise and on = topic. Then edit the things you'd normally do on the created file system: = tmp2/etc/fstab, tmp2/etc/inittab, etc. I'm now in my WBL UML instance and setting things up. It looks like its = working fine (i.e. I can ssh into it). - Peter ----- Original Message -----=20 From: "Paul Warren" <pd...@ex...> To: "Peter" <pe...@ri...> Cc: <Use...@li...> Sent: Wednesday, May 05, 2004 4:04 AM Subject: Re: [uml-user] Re: [insert distro name here] install = instructions > On Tue, May 04, 2004 at 12:49:45PM +0100, Paul Warren wrote: > > > mount: wrong fs type, bad option, bad superblock on /dev/loop1, > > > or too many mounted file systems > >=20 > > I don't understand that bit fully - is it because there is now a > > partition table at the beginning of that disk? >=20 > Yes it is. The way around this appears to be as follows - >=20 > First run fdisk on your image: >=20 > fdisk -l fedora-core-1-20040429 > You must set heads sectors and cylinders. > You can do this from the extra functions menu. > =20 > Disk fedora-core-1-20040429: 0 heads, 0 sectors, 0 cylinders > Units =3D cylinders of 1 * 512 bytes > =20 > Device Boot Start End Blocks Id = System > fedora-core-1-20040429p1 * 33 6291456 3145712 83 Linux >=20 > The important numbers seem to be 33 and 512. Take (33-1) * 512 =3D = 16384, > and use that as an offset to the loopback mount: >=20 > mount fedora-core-1-20040429 tmp -o loop,offset=3D16384 >=20 > I'm guessing that the "-1" is because the units are 1 based or > something? >=20 > I've been doing this by trial and error, but will it always be the = case > that the partition table is 16k long? >=20 > Paul >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g.=20 > Take an Oracle 10g class now, and we'll give you the exam FREE.=20 > http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick > _______________________________________________ > User-mode-linux-user mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user >=20 > |