cp vivid-desktop-amd64.iso scratch/
mkdir a b c
mount -o loop vivid-desktop-amd64.iso a/
cp -a a/* a/.* c/
cp c/casper/filesystem.squashfs b/
cd b/
unsquashfs filesystem.squashfs
sudo mount -t proc proc squashfs-root/proc
sudo mount -o bind /dev squashfs-root/dev
sudo chroot squashfs-root /bin/sh
# echo "nameserver 8.8.8.8" > /etc/resolv.conf
# cat /etc/resolv.conf
nameserver 8.8.8.8
# vi /etc/apt/sources.list
# apt update
# apt-cache policy debian-installer
debian-installer:
Installed: (none)
Candidate: 20101020ubuntu367
Version table:
20101020ubuntu367 0
500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
500 http://ppa.launchpad.net/mathieu-tl/installer-dev/ubuntu/ vivid/main amd64 Packages
# apt install debian-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
debian-installer
0 upgraded, 1 newly installed, 0 to remove and 218 not upgraded.
Need to get 675 kB of archives.
After this operation, 1351 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ vivid/main debian-installer amd64 20101020ubuntu367 [675 kB]
Fetched 675 kB in 2s (303 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_CA:en",
LC_ALL = (unset),
LC_TIME = "fr_CA.UTF-8",
LC_MONETARY = "fr_CA.UTF-8",
LC_CTYPE = "en_CA.UTF-8",
LC_ADDRESS = "fr_CA.UTF-8",
LC_TELEPHONE = "fr_CA.UTF-8",
LC_NAME = "fr_CA.UTF-8",
LC_MEASUREMENT = "fr_CA.UTF-8",
LC_IDENTIFICATION = "fr_CA.UTF-8",
LC_NUMERIC = "fr_CA.UTF-8",
LC_PAPER = "fr_CA.UTF-8",
LANG = "en_CA.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_CA.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)
Selecting previously unselected package debian-installer.
(Reading database ... 176416 files and directories currently installed.)
Preparing to unpack .../debian-installer_20101020ubuntu367_amd64.deb ...
Unpacking debian-installer (20101020ubuntu367) ...
Setting up debian-installer (20101020ubuntu367) ...
# exit
sudo umount squashfs-root/dev
sudo umount squashfs-root/proc
rm filesystem.squashfs # important, otherwise it will try to merge things.
sudo mksquashfs squashfs-root filesystem.squashfs
cd ../
sudo cp b/filesystem.* c/casper/
sudo mkisofs -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -efi-boot boot/grub/efi.img -no-emul-boot -o custom.iso c/
pheeew.
Boot and profit.