- Add the following kernel boot option to the kernel line in grub’s menu.lst and reboot ( I’m not sure which one does the trick ):
loop.max_part=63 max_part=63
- Create a sparse disk image file ( 40 GB reserved, 0 bytes on disk )
dd if=/dev/zero of=fs.image bs=1024 seek=40000000 count=0
- Initialize a new loop device ( /dev/loop0 )
losetup -f fs.image
- Create a partition table, for example 2 partitions. A 4 GB swap(loop0p1) and a root filesystem(loop0p2) containing the remaining space.
fdisk /dev/loop0
- Reread partition table for /dev/loop0. Nodes /dev/loop0p1, /dev/loop0p2, etc are created.
sudo blockdev --rereadpt /dev/loop0
- Create filesystems
mkswap /dev/loop0p1 mkfs.ext3 /dev/loop0p2
- Mount the filesystem and use debootstrap or any other method to create a file system. Don’t forget to install or copy grub to it.
mkdir fs sudo mount /dev/loop0p2 fs
- Install grub
grub
grub> device (hd0) /dev/loop0
grub> root (hd0,1)
grub> setup (hd0)
Tags: blockdev, debian, disk images, fdisk, linux, loop, mkfs.ext3, mkswap, partitions, sparse files, Ubuntu, virtual machines
September 8th, 2010 at 09:16
Buy:Retin-A.Accutane.Prednisolone.Mega Hoodia.Human Growth Hormone.Zovirax.Lumigan.Valtrex.Actos.Arimidex.Prevacid.Petcam (Metacam) Oral Suspension.Nexium.Synthroid.Zyban.100% Pure Okinawan Coral Calcium….