注意:

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

Difference between revisions of "User:Pnoecker/Cd remastering"

From Funtoo
Jump to navigation Jump to search
(correct from squash for real this time.)
(swap some things around to funtoo live cd instead of gentoo live cd. needs more work.)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Here we will remaster the gentoo minimal cd and inject a funtoo stage3 or undead usb squashfs image into it.
Here we will remaster the [https://www.funtoo.org/Funtoo:New_Install_Experience/LiveCD/Releases funtoo minimal cd] and inject a funtoo stage3 or undead usb squashfs image into it.
===setup===
{{console|body=
{{console|body=
###i## mkdir ~/livecdtmp
$##i## mkdir ~/livecdtmp
###i## mv gentoo-minimal.iso ~/livecdtmp
$##i## mv funtoo-livecd.iso ~/livecdtmp
###i## cd ~/livecdtmp
$##i## cd ~/livecdtmp
###i## mkdir mnt
$##i## mkdir mnt
###i## sudo mount -o loop gentoo-minimal.iso mnt
$##i## sudo mount -o loop funtoo-livecd.iso mnt
###i## mkdir extract-cd
$##i## mkdir extract-cd
###i## sudo rsync --exclude=/image.squashfs -a mnt/ extract-cd
$##i## sudo rsync --exclude=/image.squashfs -a mnt/ extract-cd
}}
}}


===decompress===
*the edit directory is the uncompressed squashfs archive, and can be chrooted into if we were to go that route.
*the edit directory is the uncompressed squashfs archive, and can be chrooted into if we were to go that route.


{{console|body=
{{console|body=
###i## sudo unsquashfs mnt/image.squashfs
$##i## sudo unsquashfs mnt/image.squashfs
###i## sudo mv squashfs-root edit
$##i## sudo mv squashfs-root edit
}}
}}


===merge===
*merge in our gnome stage3 with our gentoo boot disk:
*merge in our gnome stage3 with our gentoo boot disk:
{{console|body=
{{console|body=
###i## tar --numeric-owner --xattrs --xattrs-include='*' -xpf funtoo-gnome-stage3.tar.xz -C ~/livecdtmp/edit
$##i## sudo tar --numeric-owner --xattrs --xattrs-include='*' -xpf funtoo-gnome-stage3.tar.xz -C ~/livecdtmp/editfuntoo
}}
}}


*or from a squashfs image.
{{console|body=
{{console|body=
###i## sudo mksquashfs edit extract-cd/image.squashfs
$##i## sudo unsquashfs -f -d ~/livecdtmp/editfuntoo /mnt/filesystem.squashfs
}}
}}


*or from a squashfs image.
===load modules===
*merge the live cd's kernel modules with our stage3 root:
{{console|body=
$##i## sudo cp -r edit/lib/modules/6.1.4_p1-debian-sources editfuntoo/lib/modules/
}}
 
===compress===
{{console|body=
{{console|body=
###i## sudo unsquashfs -f -d ~/livecdtmp/editfuntoo /mnt/filesystem.squashfs
$##i## sudo mksquashfs editfuntoo extract-cd/image.squashfs
###i## sudo rsync -a editfuntoo edit
}}
}}


===burn===
*now we are ready to cd into extract-cd & generate the iso image again:
*now we are ready to cd into extract-cd & generate the iso image again:
{{console|body=
{{console|body=
###i## cd extract-cd
$##i## cd extract-cd
###i## sudo xorrisofs -D -r -V "test" -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 -e '/gentoo.efimg' -no-emul-boot -isohybrid-gpt-basdat -o ../funtoo-live.iso .
$##i## sudo xorrisofs -D -r -V "test" -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 -e '/funtoo.efimg' -no-emul-boot -isohybrid-gpt-basdat -o ../funtoo-homemade-live.iso .
$##i## sudo isohybrid --uefi ../funtoo-homemade-live.iso
}}
}}

Latest revision as of 20:08, January 22, 2023

Here we will remaster the funtoo minimal cd and inject a funtoo stage3 or undead usb squashfs image into it.

setup

user $ mkdir ~/livecdtmp
user $ mv funtoo-livecd.iso ~/livecdtmp
user $ cd ~/livecdtmp
user $ mkdir mnt
user $ sudo mount -o loop funtoo-livecd.iso mnt
user $ mkdir extract-cd
user $ sudo rsync --exclude=/image.squashfs -a mnt/ extract-cd

decompress

  • the edit directory is the uncompressed squashfs archive, and can be chrooted into if we were to go that route.
user $ sudo unsquashfs mnt/image.squashfs
user $ sudo mv squashfs-root edit

merge

  • merge in our gnome stage3 with our gentoo boot disk:
user $ sudo tar --numeric-owner --xattrs --xattrs-include='*' -xpf funtoo-gnome-stage3.tar.xz -C ~/livecdtmp/editfuntoo
  • or from a squashfs image.
user $ sudo unsquashfs -f -d ~/livecdtmp/editfuntoo /mnt/filesystem.squashfs

load modules

  • merge the live cd's kernel modules with our stage3 root:
user $ sudo cp -r edit/lib/modules/6.1.4_p1-debian-sources editfuntoo/lib/modules/

compress

user $ sudo mksquashfs editfuntoo extract-cd/image.squashfs

burn

  • now we are ready to cd into extract-cd & generate the iso image again:
user $ cd extract-cd
user $ sudo xorrisofs -D -r -V "test" -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 -e '/funtoo.efimg' -no-emul-boot -isohybrid-gpt-basdat -o ../funtoo-homemade-live.iso .
user $ sudo isohybrid --uefi ../funtoo-homemade-live.iso