Jump to content

Recommended Posts

Posted

My Laptops running Gentoo but i wanted to run pentoo and the latest gentoo live DVD.

Im sure there are more elaborate ways of getting this done but this one does the trick for me..

If you are working with a couple other distros you might want to make a directory for staging or whatever..

First grab the initramfs file usually in the boot directory or the isolinux directory of the distro. For gentoo releases ive only see it named gentoo.igz or gentoo64.igz..

copy it to your staging area..

rename the gentoo.igz to gentoo.gz..

uncompress the file..

gzip -d gentoo.gz

unpack..

cpio -i < gentoo.gz

example:

mindfuck staging # ls -la
total 20
drwxr-xr-x   5 root root 4096 Sep  3 11:30 .
drwxr-xr-x 108 root root 4096 Sep  2 15:57 ..
drwxr-xr-x  13 root root 4096 Sep  2 15:33 gentoo.11.gentoo.igz
drwxr-xr-x   4 root root 4096 Aug 30 11:31 mindfuck
drwxr-xr-x  12 root root 4096 Sep  2 18:31 pentoo
mindfuck staging # pwd
/root/staging
mindfuck staging # 

Ill use pentoo as an example:

mindfuck staging # cd pentoo/
mindfuck pentoo # ls -l
total 60
drwxr-xr-x 2 root root  4096 Sep  2 18:31 bin
drwxr-xr-x 2 root root  4096 Sep  2 18:31 dev
drwxr-xr-x 3 root root  4096 Sep  2 18:31 etc
-rwxr-xr-x 1 root root 17708 Sep  2 18:31 init
drwxr-xr-x 4 root root  4096 Sep  2 18:31 lib
lrwxrwxrwx 1 root root     3 Sep  2 18:31 lib64 -&gt; lib
lrwxrwxrwx 1 root root     4 Sep  2 18:31 linuxrc -&gt; init
drwxr-xr-x 2 root root  4096 Sep  2 18:31 proc
drwxr-xr-x 2 root root  4096 Sep  2 18:31 sbin
drwxr-xr-x 2 root root  4096 Sep  2 18:31 sys
drwxr-xr-x 2 root root  4096 Sep  2 18:31 temp
drwxr-xr-x 4 root root  4096 Sep  2 18:31 usr
drwxr-xr-x 3 root root  4096 Sep  2 18:31 var
mindfuck pentoo # 

At first i thought the script i needed was init but it ended up being initrd.scripts in etc:

mindfuck etc # ls -la
total 52
drwxr-xr-x  3 root root  4096 Sep  2 18:31 .
drwxr-xr-x 12 root root  4096 Sep  2 18:31 ..
-rw-r--r--  1 root root    97 Sep  2 18:31 fstab
-rwxr-xr-x  1 root root  1796 Sep  2 18:31 initrd.defaults
-rwxr-xr-x  1 root root 29244 Sep  2 18:32 initrd.scripts
drwxr-xr-x  2 root root  4096 Sep  2 18:31 modules
mindfuck etc #

This is the entry i changed to reflect the file gentoo looks for when you set the "cdrom" flag in the kernel boot on grub4dos.. :

bootstrapCD() {     
        local DEVICES=`devicelist`
        # The device was specified on the command line, so there's no need to scan
        # a bunch of extra devices  
        [ -n "${CDROOT_DEV}" ] &amp;&amp; DEVICES="${CDROOT_DEV}"

        findmediamount "cdrom" "${SUBDIR}/pentoo" "REAL_ROOT" "${NEW_ROOT}" ${DEVICES}
}

You will notice the pentoo entry there.. Just rename the livecd file to whatever you want and make sure its placed in that entry..

save, then back out to where init is (/root/staging/pentoo for this example)

Now we need to repack the file:

find . | cpio -H newc -o &gt; ../gentoo.cpio
cd ..
gzip -9 gentoo.cpio -c &gt; gentoo.igz

Copy it back to where you grabbed it from. For pentoo it was in isolinux copy the livecd file to / and rename it to what you set it to in initrd.scripts

As i said ive got pentoo and the latest live dvd running on my usb boot..

Hope this helps someone who enjoys gentoo as much as i do..

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...