boot from a ISO in HD or uncompressed squashfs
(=?utf-8?q?=60=60-=5F-=C2=B4=C2=B4?=) -- Fernando
ubuntu at bugabundo.net
Fri Sep 19 11:33:11 UTC 2008
As always, while testing the development versions of Ubuntu (current case Intrepid) my systems starts to get a bit away from the NEW Install system.
So sometimes I need to re-test against the LiveCDs/LiveDVDs.
I've made a set of scripts that helps me do this.
* rsyncubuntucd
#!/bin/bash
echo "download http://cdimage.ubuntu.com/cdimage/daily-live/current/intrepid-desktop-amd64.iso"
time nice -n 15 rsync -zvvhhP --stats rsync://cdimage.ubuntu.com/cdimage/daily-live/current/intrepid-desktop-amd64.iso ~/temp
wget -O - http://cdimage.ubuntu.com/daily-live/current/MD5SUMS | grep desktop-amd
echo "ionice do md5sum"
time sudo ionice -c3 md5sum ~/temp/intrepid-desktop-amd64.iso
* rsyncubuntudvd
#!/bin/bash
echo "download http://cdimage.ubuntu.com/cdimage/dvd/current/intrepid-dvd-amd64.iso"
time nice -n 15 rsync -zvvhhP --stats rsync://cdimage.ubuntu.com/cdimage/dvd/current/intrepid-dvd-amd64.iso ~/temp
wget -O - http://cdimage.ubuntu.com/dvd/current/MD5SUMS | grep amd
echo "ionice do md5sum"
time sudo ionice -c3 md5sum ~/temp/intrepid-dvd-amd64.iso
* squasfs (extracts the content of a livecd to disk)
#!/bin/bash
echo "copia do squashfs"
mount -o loop ~/temp/intrepid-desktop-amd64.iso /mnt/iso
mount -t squashfs -o loop /mnt/iso/casper/filesystem.squashfs ~/temp/livecd/squashfs
nice -n 20 rsync -vrhP --stats ~/temp/livecd/squashfs/ ~/temp/livecd/edit/
cp /root/scripts/livecdchroot ~/temp/livecd/edit/root/livecdchroot
* livecdchroot (allows me to boot into recovery console and boot the squashfs dir)
#!/bin/bash
echo "chroot"
#chroot ~/temp/livecd/edit
mount -t proc none /proc
mount -t sysfs none /sys
export HOME=/root
export LC_ALL=C
cd /dev/
MAKEDEV generic
/etc/init.d/dbus restart
#startx
So far so good.
but how about booting from GRUB?
I would like to boot from either the ISO or the squashfs dir.
Is it possible?
I've been struggling with this, and manage to get this stanzas onto grub, but it wont work. It might be because my /boot is EXT3, but /home is XFS (and AFAIK GRUB doesnt work with XFS).
### END DEBIAN AUTOMAGIC KERNELS LIST
title Ubuntu intrepid (cdboot)
root (hd0,0)
kernel /boot/cdrom/vmlinuz ramdisk_size=100000 fromhd=/home/bugabundo/temp/livecd/edit/
initrd /boot/cdboot/initrd.img
title Ubuntu intrepid (hdboot)
root (hd0,0)
kernel /boot/hdrom/vmlinuz ramdisk_size=100000 fromhd=/home/bugabundo/temp/livecd/edit/
initrd boot/hdboot/initrd.img
title Ubuntu via net (cdimage Intrepid Live DVD 64bits daily)
kernel /boot/inetbootlinux netdir=http://cdimage.ubuntu.com/dvd/current/intrepid-dvd-amd64.iso type=casper
initrd /boot/inetbootminirt.gz
title Ubuntu via net (cdimage Intrepid Live CD 64bits daily)
kernel /boot/inetbootlinux netdir=http://cdimage.ubuntu.com/daily-live/current/intrepid-desktop-amd64.iso type=casper
initrd /boot/inetbootminirt.gz
Any tips on how to make this work are appreciated.
Thanks in advance.
--
BUGabundo :o)
(``-_-ยดยด) http://LinuxNoDEI.BUGabundo.net
Linux user #443786 GPG key 1024D/A1784EBB
My new micro-blog @ http://BUGabundo.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080919/bc128447/attachment.sig>
More information about the ubuntu-users
mailing list