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

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



El 28/08/14 11:35, Thomas Schmitt escribió:
Hi,

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.
I see.
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:
   http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/

Yes, but these tools, in theory, won't work perfect with Debian Installer till #724931 and #759744 are fixed.

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.

Yes, that's the main idea so that you do not have to release 1 GB, 2 GB and 4 GB size images for each one of the usb media size you want to provide to.

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.

Yes, I have checked it and it works. I mean even if the ISO's partition table is ~ 500 GB size initially when you dd. Live CD detected my hard disk as a 4 GB size one.

And, yes, I could create a new partitions thanks to gparted. So instead of using gparted from a live cd there could be a new option found at the same installer: "Repartition free space to store extra ISO images".

The user copies the additional ISO files to the new partition from e.g. Windows.

Then you would need some of the implementation about detecting new ISOs from the partition directory and using them that it's already found at: #724931 .

The other option would be providing a tool for Windows so that it did the partitioning of the usb after dding the image to it. Not sure if it's worth the effort.

Probably we should add a new bug suggesting the repartitioning of free space from installer and close this one. Not sure about it. I personally like the cat idea because is very new but at the same we are saving data into an space that could be thought of being empty.

I mean, perhaps someone could imagine to reuse "free" space in the USB for their own files while loosing their initial "hidden" extra ISOs.

I ask myself what's the opinion of debian-cd people on this subject.

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" ?

Busybox has loop support but not offset support that I'm aware.
Losetup is not found when running a shell from the installer.

== 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
Yes, you are right. Although fdisk -l also shows this size somewhere.

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.

Yes, actually, loop mount (without the offset feature) currently works from the installer. So you won't need need the previous system installation for mounting the isos.

Anyways this would need some of the implementation found in bug #724931 .

== 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*.

Yes, the thing is making sure that the path to the isos in the installer are the same one as the installed system paths. You know like the installer using /extraisos directory and then finding the usb partition in the installed system like /media/UUID-1234-... .

I haven't checked it in #bug 724931 yet. They might not have sorted it out in a proper way.

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.

I agree.

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.
You are right.

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 ?

When someone want to use CD1, CD2 and CD3 from the same usb. E.g. giving the usb to someone else who is offline.

What benefits would it have for Debian's ISO production and
download sites ?

You won't need to release one file per each one of the GB-sized usbs. As I said above: You do not have to release 1 GB, 2 GB and 4 GB size images for each one of the usb media size you want to provide to.

Have a nice day :)

Thomas

Thank your for input. Somehow I thought that my 4 GB hard disk test after dding the ~ 500 GB image would have been detected as a 500 GB size only hard disk.


adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


Reply to: