Hello all!
thanks for the discussion, and the advice for remastering the iso. I
did not know the method Thomas proposed, which seems quite elegant, it
seems to be a good idea. Personaly, for remastering the iso, I used to
mount it with -o,loop option, then cp it into a /mnt/foo folder,
modified all I want, and finaly remaster it with the desired booting
option.
But my problem finaly moved to knowing how to manage the persistence.
I was on a hurry, and I finally performed a "hard install", as I
expained in the preceding answer of the post.
Formerly, I used syslinux on the usb stick, and I cp the content of
the iso on it. I just had to rename all the "isolinux" to "syslinux".
Then i had to modify the options in the live.cfg file with the
persistence options, and make a "live-rw" file or partition.
Now that it works with grub, and EFI, and that it is no more well
documented, it is difficult to know how to do. I succeeded to install
9.1 live on a stick with a nice automatic tool "rufus"
(https://rufus.akeo.ie/), that works quite well, but does not manage
persistence. I found the config file as /boot/grub/grub.cfg.
I append a "persistence" option in one menu entry. Then created a
partition called "persistence". But I am not sure of the defaut name of
the persistence partition, of file, and even of the option to put.
Is there a documentation of the actual live system?
Regards,
Le 14/08/2017 à 17:12, Thomas Schmitt a écrit :
Hi,
A Abbes wrote:
I cannot modify the grub.cfg file to allow persistence.
Meanwhile we had the proposal to remaster the ISO and the proposal
to install a normal Debian to a separate USB stick.
(For the latter Debian 9 Live ISOs have earned a bad reputation on
debian-user mailing list. So they could well need more practicing.)
There is also the method of creating a new partition on the USB stick
after the ISO end. It would get a read-write filesystem (e.g. ext2)
and would possibly be mapped over the ISO as overlay filesystem.
Knoppix does it that way.
I skip the fourth opportunity: Patching of existing data files while
maintaining their sizes. That's binary hacking.
Number five is ISO 9660 Multi-session.
Andreas Heinlein wrote:
There are tools which would allow you to modify the ISO file, but it's
rather complicated.
Not too complicated but not necessarily what one wants. :))
By ISO 9660 multi-session the ISO gets appended a new superblock, a new
directory tree, and the content blocks of the changed data files.
Depending on the medium type, the superblock at the start of the medium
(or image file) needs to be overwritten. On write-once multi-session media
Linux will mount the superblock of the youngest hardware session.
One will in any case want to do all intended changes in one sweep,
although one can add more than one session.
The main difficulty is to keep all the boot starting points working.
Because it is so nicely small, i practice with a netinst ISO image:
cp debian-9.1.0-amd64-netinst.iso test.iso
iso=test.iso
or with USB stick /dev/sdc which already holds that ISO:
dd if=debian-9.1.0-amd64-netinst.iso bs=1M of=/dev/sdc
iso=stdio:/dev/sdc
# chmod yourself write permission to /dev/sdc or become superuser
A session gets appended by:
xorriso -dev "$iso" \
-map my_new_grub.cfg /boot/grub/grub.cfg \
-boot_image any replay
Between the -map command and the -boot_image command there may be more
manipulation commands to put files into the ISO, or rename, or delete them.
With xorriso versions older than 1.4.2 one would use
-boot_image any keep
which is broken since 1.4.4, as i now learned. A simple intitialization bug.
"replay" is smarter, anyways.
The version number is told by:
xorriso -version
Have a nice day :)
Thomas