Note

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "User:Pnoecker/Undead USB Install/undead2live"

From Funtoo
Jump to navigation Jump to search
(add libisoburn)
m (update a little bit more for course of path for pure funtoo live cd generation booting from debian sources.)
Line 1: Line 1:
https://help.ubuntu.com/community/LiveCDCustomization#Assembling_the_file_system
https://help.ubuntu.com/community/LiveCDCustomization#Assembling_the_file_system


make an undead usb from a stage 3 containing networkmanager, xfce4, x11-xorg, fchroot, slim, with auto login root terminals.  setup slim to boot root so the entire undead key does not have a password.  tidy up the undead key delete the stage3 tarball, delete the sources directory.
make an undead usb from a stage 3 containing networkmanager, xfce4, x11-xorg, fchroot, slim, with auto login root terminals.  setup slim to boot root so the entire undead key does not have a password.  tidy up the undead key delete the stage3 tarball, delete the sources directory.  insert auto as root's file system in /etc/fstab so it will load in both ext2 & squashfs modes.


{{console|body=
{{console|body=
Line 27: Line 27:
{{console|body=
{{console|body=
###i## dd if=/mnt/filesystem.squashfs of=/dev/funtoo2
###i## dd if=/mnt/filesystem.squashfs of=/dev/funtoo2
}}
{{console|body=
###i## mount /dev/funtoo2 /mnt/funtoo
###i## mount /dev/funtoo1 /mnt/funtoo/boot
}}
chroot into the squashfs image to manipulate grub on the read write fat partition.
{{console|body=
###i## env -i HOME=/root TERM=$TERM $(which chroot) /mnt/funtoo bash -l
}}
grub bios mode boot image is located at
*/boot/grub/i386-pc/boot.img
we have to make the efi image:
{{console|body=
###i## grub-mkimage
}}
exit chroot
{{console|body=
###i## exit
}}
generate iso image, and make it hybrid mode so it can be read from both cd/dvd, and usb key.
{{console|body=
###i## xorrisofs -D -r -V "$IMAGE_NAME" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../custom.iso .
###i## isohybrid --uefi ../custom.iso
}}
}}

Revision as of 14:53, April 29, 2021

https://help.ubuntu.com/community/LiveCDCustomization#Assembling_the_file_system

make an undead usb from a stage 3 containing networkmanager, xfce4, x11-xorg, fchroot, slim, with auto login root terminals. setup slim to boot root so the entire undead key does not have a password. tidy up the undead key delete the stage3 tarball, delete the sources directory. insert auto as root's file system in /etc/fstab so it will load in both ext2 & squashfs modes.

root # emerge cdrtools squashfs-tools isomaster libisoburn

mount your undead usb key, but not dev sys or any of the other stuff because were going to package it with squashfs.

root # mount /dev/funtoo2 /mnt/funtoo
root # mount /dev/funtoo1 /mnt/funtoo/boot

edit /mnt/funtoo/etc/fstab file system's from ext4 & vfat to auto so we can have it auto load squashfs.

root # mksquashfs /mnt/funtoo /mnt/filesystem.squashfs

using isomaster you can insert /mnt/filesystem.squashfs into an xubuntu live cd. virtualbox will boot it, real hardware will not. it probably needs eltorito.img or isolinux.bin setup to chainload grub or whatever. the idea is were inserting our chroot into another live cd's chroot location.

xubuntu has a casper/ directory in the iso that contains a file called filesystem.squashfs, delete their chroot, insert ours. write iso. cheat to win has drawbacks, they're using overlayfs so they're overlaying files on the filesystem somewhere so another choice of live cd to modify is probably a good idea.

maybe we can get our grub loading the squashed image with a command like this.

root # dd if=/mnt/filesystem.squashfs of=/dev/funtoo2
root # mount /dev/funtoo2 /mnt/funtoo
root # mount /dev/funtoo1 /mnt/funtoo/boot

chroot into the squashfs image to manipulate grub on the read write fat partition.

root # env -i HOME=/root TERM=$TERM $(which chroot) /mnt/funtoo bash -l

grub bios mode boot image is located at

  • /boot/grub/i386-pc/boot.img

we have to make the efi image:

root # grub-mkimage

exit chroot

root # exit

generate iso image, and make it hybrid mode so it can be read from both cd/dvd, and usb key.

root # xorrisofs -D -r -V "$IMAGE_NAME" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../custom.iso .
root # isohybrid --uefi ../custom.iso