Gentoo install-x86-universal-2005.1.iso

DasFox

Diamond Member
Sep 4, 2003
4,668
46
91
Anyone that uses Gentoo know, after mounting the install-x86-universal-2005.1.iso how you can recreate the iso and make a bootable cd with the new iso?

What I want to do is remove all the stages in /stages and put in a Stage4 backup that I made, so that if I ever need to reinstall Gentoo I have it on this stage.

I thought I could just mount the iso and copy the contents out and then make another iso and burn that to cd, but this is not making a bootable cd.

THANKS
 

DasFox

Diamond Member
Sep 4, 2003
4,668
46
91
I don't want to build one I just want to mount the 'install-x86-universal-2005.1.iso, 'mount -o loop /path/to/isofile /mnt/iso' 'copy the contents out, 'cp -a' into another directory, then remove the stages in /stages and put in a stage4 I made, if I ever need to reinstall Gentoo, then use 'mkisofs' to make the new iso bootable.

And from what I have read on the Gentoo forum you can do this, but I didn't get how the commands worked that I read for 'mkisofs'
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
So you have a Linux Live CD, but it doesnt have that particular
program you need to have and you must edit the CD. Just to make it interesting, we are going to do it all by command line, including
burning the ISO to cdrom:


EXTRACT CD:

1) Boot up a Linux Box (I used WhiteBox Enterprise with 2.4.21-27 kern)
2) Insert CD into CDROM
3) mkdir /cdiso
4) cp -av /mnt/cdrom/* /cdiso

EXTRACT and EDIT INITRD.IMG (The Linux Filesystem)

5) mkdir /cdinitimg
6) find the initrd.gz or initrd.img in /cdiso
7) gunzip -c /cdiso/isolinux/initrd.img > /cdinitimg/initrd.img
- believe it or not the image is compressed
8) cd /cdinitimg
9) mdkir point
10) mount initrd.img point -o loop
11) mkdir /cdimgextract
12) cp -av /cdinitimg/point/* /cdimgextract
13) umount /cdinitimg/point
14) rm -rf /cdinitimg
15) make any changes you need to the initrd.img in /cdimgextract

REMAKE MODIFIED INITRD.IMG

16) mkdir /cdinitrd
17) dd if=/dev/zero of=initrd.img bs=1k count=60960
18) mke2fs -i 1024 -b 1024 -m 5 -F -v initrd.img
19) mount initrd.img cdinitrd -t ext2 -o loop
20) cp -av /cdimgextract/* /cdinitrd
21) umount /cdinitrd
22) gzip --best initrd.img
23) cp initrd.img /cdiso/isolinux/
24) rm -rf /cdinitrd
25) rm -rf /cdimgextract

REMAKE MODIFIED ISO

26) cd /cdiso
27) use this shell script:
-note: you may have to edit it a little to fit your ISO.

#!/bin/bash
# make the new iso and put in root.
mkisofs -o /new.iso -b isolinux/isolinux.bin
-c isolinux/boot.cat -no-emul-boot -boot-load-size 4
-boot-info-table -J -R -V disks .
#

28) now you have a new ISO named new.iso in your / directory

BURN THE NEW ISO IMAGE

29) eject the old cd, and pop in a blank
- make sure you have cdrecord
30) cdrecord -v -pad speed=1 dev=0,0,0 /new.iso

NOTE: For the record, I had to edit a G4U CD to add dolly client
(a peer to peer client for clustering) for a project here at work.
This is the documentational(?) output.

#EOF

source http://www.asylumnation.com/blogs/amerikanjunkie/post-2775.html

Or you can do what I do, use a mininal gentooCD and get the stage 4 from another cd or your network backup.