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

Bug#759406: debian-cd: Merge iso images into usb drive thanks to cat


i am watching this bug as upstream developer of xorriso,
which packs up Debian ISOs under control of debian-cd.

So i can mainly comment about early boot stages and mounting
of ISO 9660, not much about Debian installer issues which
arise after or before these steps.

>From your initial report i got the impression that you
wanted to let the user choose any of the ISOs for booting.
There are descriptions in the web for boot media which
contain multiple ISOs.
Google "boot multiple iso" found:

But now it seems that you want to install Debian from
the first ISO onto hard disk and then only want to use the
other ISOs as alternative sources of packages.

So i wonder why you do not dd the first ISO onto the USB stick
(which will install an MBR and declare partition 1). Then you
could use a partition editor to create partition 2 which covers
the remaining blocks of the USB stick.

There you could create a mountable filesystem (e.g. FAT)
and store the other ISOs for loop-mounting.

> Well, this works if you use mount command from util-linux package. busybox's
> mount does not implement offset feature, so it either ignores it or
> complains about it.

Originally "offset" is a feature of losetup(8) which creates
a loop device for mount if option "loop" is given.
The Archlinux example shows option "loop".
Did you try busybox mount with "loop" ?

> == Getting to know Debian CD 1 size ==
> # fdisk -l debian-7.6.0-i386-CD-1.iso

This tells the size of the MBR partition which was wrapped
around the Debian image by xorriso. It may or may not give the
size of the ISO image data file.

Since you concatenate the image files and not the partition
contents, you should rather inquire the file size. Like:

  ls -l debian-7.6.0-i386-CD-1.iso

> chroot /target /bin/mount /dev/sdb /mnt/apt2 -o offset=679477248 -t iso9660
> you will see that you can read Debian CD 2 disk while it's have been
> concatenated to the USB !!!

In the case of a FAT filesystem in /dev/sdb2, which holds
the other ISOs you would first mount the FAT

  mkdir /target/mnt/usb_fat
  chroot /target /bin/mount /dev/sdb2 /mnt/usb_fat

and then mount the desired ISO from inside the FAT:

  mkdir /target/mnt/apt2
  chroot /target /bin/mount -o loop /mnt/usb_fat/apt2.iso /mnt/apt2

Note that no size information is needed to find the ISO but rather
its file name inside the FAT filesystem. I assume that the name of
debian-7.6.0-i386-CD-2.iso copy in the FAT is /apt2.iso.

One could also put the desired ISOs into a ext2/3/4 filesystem
instead of a FAT. This would allow the use of long filenames.
If they all are put into an ISO then they would be write-protected
for normal users.

> == Busybox based Implementation ==
> This implementation would involve hacking busybox's mount

Would probably not be necessary if the ISOs are presented as
data files of a mountable filesystem.

> Somehow a tool would be needed so that the user can mount its Debian CD 2
> from its USB as easier as possible (Maybe a noauto entry in fstab).

fstab could contain lines for /target/mnt/fat and /target/mnt/apt*.

> For Windows people it would be nice to have a GUI where you can select
> (always with CD 1 as the first one) all the cds you want and then
> concatenate them into a USB device.

The normal MS File Manager could populate the mounted
FAT filesystem.

> As you might suspect you need to know the iso size in advance so that this
> works in a reasonable way.

Not if the ISOs are data files inside a filesystem.

> Do you think it's something that it's easy to implement ?

Not really.

I get the impression that you plan to create a kindof minimal
filesystem. My main objection is that suitable filesystems
already exist and are supported by a wide range of operating
systems and tools.

Outside my personal scope is the motivation for your proposal.
A Debian person might ask:
What are the use cases where it will be of help ?
What benefits would it have for Debian's ISO production and
download sites ?

Have a nice day :)


Reply to: