0

I make custom Debian live usb via live-helper. So far it works great, but when I add some extra packages to the default installation, the output image cannot be mounted. Basically I create image this way:

   # lh_config -b usb-hdd -m http://ftp.cz.debian.org/debian/ --packages "..."
   # lh_build
   # mount -o loop,offset=512 binary.img /mnt

Results in

   mount: you must specify the filesystem type

But with less additional packages it can be mounted. Interesting are these values:

   # fdisk -ul small.img
   You must set cylinders.
   You can do this from the extra functions menu.

   Disk small.img: 0 MB, 0 bytes
   54 heads, 36 sectors/track, 0 cylinders, total 0 sectors
   Units = sectors of 1 * 512 = 512 bytes
   Disk identifier: 0x0005a3cb

   Device Boot      Start         End      Blocks   Id  System
   small.img1   *           1      276479      138239+  83  Linux
   Partition 1 has different physical/logical endings:
   phys=(17, 53, 36) logical=(142, 11, 36)

And for the bigger image:

   # fdisk -ul big.img
   You must set cylinders.
   You can do this from the extra functions menu.

   Disk webstep_rescue_disk_usb.img: 0 MB, 0 bytes
   255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
   Units = sectors of 1 * 512 = 512 bytes
   Disk identifier: 0x0002a2ab

   Device Boot      Start         End      Blocks   Id  System
   big.img1   *          63      771119      385528+  83  Linux

So, what is the problem? The end of the image ends in the middle of sector or what?

I've used the Debian/Live info: http://wiki.debian.org/DebianLive/Howto/USB

The main reason for mounting the image is that I want use vesa32 custom syslinux menu and splash screen.

1 Answer 1

0

I've solved the problem. The partition in the bigger image starts on sector 63, so the proper mount command is

 mount -o loop,offset=32256 binary.img /mnt

The offset parameter has to be bytes_per_sector * start_sector, which in this case is 512 * 63 = 32256.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .