bug-grub
[Top][All Lists]
Advanced

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

Re: mkbimage


From: Thierry Laronde
Subject: Re: mkbimage
Date: Fri, 25 Oct 2002 22:39:40 +0200
User-agent: Mutt/1.2.5i

On Fri, Oct 25, 2002 at 12:01:53AM -0400, Patrick Mahoney wrote:
> Hi pple,
> 
> Im trying to use the mkbimage script that comes with grub's debian
> package... I do:
>       mkbimage -f root.tar -t hd -s ext2
> where root.tar contains stage1 and stage2 files.
> 
> 1) I cant mount hd.image:
> # mount ./hd.image /mnt/nyx/ -o loop=/dev/loop0 -t ext2
> mount: wrong fs type, bad option, bad superblock on /dev/loop0,
>        or too many mounted file systems

This is normal: you can mount a fs, not a device. The hd image is
composed of a "MBR" (first sector), some sectors not allocated ("first
cylinder") and then the first (and lonely) partition. If you want to
mount the image you need to skip the pseudo first cylinder like this:

losetup -o $(( 63 * 512 )) /dev/loop1 ./hd.image

mount -t ext2 /dev/loop1 /mnt/nyx

> 
> 2) I cant boot hd.image with bochs: it hangs at "Booting from Hard
> disk"...

First, via `od' or `hexdump' verify that the first sector holds a GRUB
MBR. If this is the case, the virtual disk should be OK. I don't use
Bochs so I don't know if its virtual disks have to be special in some
way.
Another brut force approach if you have a CD-RW burner is to burn a
rewritable CD creating a bootable El Torito CD in hd emulation using the
very image created. It it works, the virtual disk is OK (you can use too
a CD-burner but be prepare to lose at least some place on a brand new
CD--- you can create a multisession one, but on subsequent burns you
will lose the bootable ability).

Cheers,
-- 
Thierry Laronde (Alceste) <address@hidden>
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C




reply via email to

[Prev in Thread] Current Thread [Next in Thread]