Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo CD, initrd contents, busybox....
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Tue Sep 10, 2002 3:35 am    Post subject: Gentoo CD, initrd contents, busybox.... Reply with quote

HI!
I've been messing around with the internals of the Gentoo boot cd. Decompressing the rescue.gz, mounting it under a directory (loopback) and trying to manipulate the contents into another loopback device. One thing I have noticed is oddly, the busybox stuff isn't linked when you mount it. (ls -> busybox, df -> busybox, etc) I've gone through quite a few cds while experimenting, but unfortunately I haven't been able to figure it out.
Is there some script that is ran on boot that creates all the busybox soft links?

The reaosn I'm doing this is to make a custom cd for myself based on the Gentoo cd style. (basically the same system, different utilities backup program, memtest86, various other things including custom scripting)
I know how to make a boot cd from the isolinux homepage:
mkisofs -R -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /mnt/backup/rescuecd > /mnt/backup/cd.iso
But unfortunately the initrd rescue.gz is driving me nuts lol.. HELP!
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Tue Sep 10, 2002 5:30 pm    Post subject: Reply with quote

I'm not sure when the symlinks are created, but I remember that it is indeed as you say. At any rate -- can't you just clear out the binaries and libraries you don't need and add new ones?

Code:
# dd if=/dev/zero of=myramdisk
# mkminixfs myramdisk (as minixfs uses less header data meaning more data per byte)
# mount -o loop myramdisk mydir/
# cp -a gentoord/* mydir/

_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Tue Sep 10, 2002 10:29 pm    Post subject: Reply with quote

Well, I could, but that would require a much larger ramdisk to hold all of that. Remember, everything in that loopback is loaded into ram. I want everything that is there, but I just want to add more. Almost everything in there is a link to busybox, except for the filesystem, raid, and lvm stuff.

Busybox does a great job of including enough functionality for each function, that's why I wanted to keep it how it was.

If no one knows, I guess I'll just rip it apart until theres nothing left of Gentoo's scripting at all. I would hate to do that, because it's redundant. Everythings already there, tho :( It'd be easier to just make my own mini-distro if it came down to that :(

I'll see if I can just link everything myself. Maybe that'll do it.
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Wed Sep 11, 2002 1:20 am    Post subject: Reply with quote

Okay, I was crusing through the mounted rescue.gz file, and I noticed that in the /etc/init.d/rcS file, there is a command:
Code:

#install all tools
busybox --install -s


I'm wondering why this wasn't called when I made a CD with a new loopback.

I made a directory with all the stuff (cp -pR from the mounted loopback), added my stuff in with the proper libraries and all, then used sections of the lmvcreate_initrd script to calculate the size of the ramdisk.
(below is from the default rescue.gz)
Code:

cd /mnt/rescue_worklocation
DEVRAM=/tmp/initrd.$$
TMPMNT=/tmp/mnt.$$
RESULTINGFILE=/tmp/new_rescue.gz

# number of inodes being used
NUMINO=`find | wc -w`
(result: 696)
# size of files
INITRDSIZE=`du -ck | tail -1 | cut -f 1`
(result: 18486)
# from documentation, adds files + inodes + filesystem metadata
# enough for ext2 fs + a bit
INITRDSIZE=`expr $INITRDSIZE + $NUMINO / 8 + 512`
(result: 19085)
# Makes the ramdisk that we will be working with
dd if=/dev/zero of=$DEVRAM count=$INITRDSIZE bs=1024 > /dev/null 2>&1
# LVM uses this.. I'm not sure exactly what it does, but...
# I'm guessing it turns the INITRDSIZE to Bytes then divides it by the inodes
INODE_OPT="-i `expr $INITRDSIZE \* 1024 / $NUMINO`"
mke2fs -F -m0 $INODE_OPT $DEVRAM $INITRDSIZE
# Mounts the ramdisk to a temporary mount for us to use
mount -o loop $DEVRAM $TMPMNT
rmdir $TMPMNT/lost+found
# Copies the stuff we want to put into the ramdisk, into the ramdisk
find | cpio -pdm $TMPMNT
umount $DEVRAM
# Makes our final output file, suitable for using as an initrd.
dd if=$DEVRAM bs=1k count=$INITRDSIZE 2>/dev/null | gzip -9 > $RESULTINGFILE
# remove out crap :)
rm -rf $DEVRAM $TMPMNT


this was a brief synapsis of what I did by hand, except well.. I just peiced it together into script form to make it more readable. (believe me, if I typed it out as I did it, it would have been gobbly goop)

But if the stuff is there, and /etc/init.d/rcS is also there, shouldn't it run considering it starts up as single-user?
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Wed Sep 11, 2002 7:08 am    Post subject: Reply with quote

Well, I did it.
It basically came down to creating a custom script by stealing segments of the lvmcreate_initrd script.
I created a script that basically expects you to be in the directory containing the files to go into the ramdisk (initrd), then it does it's magic and turns it into a file called /tmp/new_rescue.gz. I popped that into a cdrom directory under the isolinux directory which I copied from the gentoo cd. (with the name rescue.gz of course) I changed the ramdisk_size= parameter in the isolinux/isolinux.cfg to reflect the different size. (I cheated, I just put in 25 megs) I should add a peice into the script to throw out a text file with the size of the loopback deviice for this.
then I cd'ed to the directory holding the stuff I want on the cd, and ran:
Code:

mkisofs -R -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /mnt/devel/cdrom > /mnt/devel/cd.iso


of course I burnt it after that and tested it under vmware to see if it did it's thing. Sure enough, it did. Tho partimage has problems, but thats to be expected. It had problems even before that lol.

here's the script:

Quote:

#!/bin/sh

# temporary mountpoint
TMPMNT=/tmp/mnt.$$
# temporary file for ramdisk
DEVRAM=/tmp/initrd.$$
# ending resulting initrd file
RESULTINGFILE=/tmp/new_rescue.gz
# Number of Kilobytes to pad the INITRDSIZE to allow text files and stuff
# made after ramdisk is mounted and such. (Default: 1600 )
PADDING=1600
PATH=/bin:/sbin:/usr/bin:/usr/sbin:$PATH

# find number of files/inodes
NUMINO="`find | wc -w`"

# pad numino
NUMINO=`expr $NUMINO + 64`

# Uncomment and add a value to override the automatic sizing
# INITRDSIZE=

# Calculate the initrd size
if [ -z "$INITRDSIZE" ]; then
echo "$cmd -- calculating loopback file size"
INITRDSIZE="`du -ck | tail -1 | cut -f 1`"
INITRDSIZE=`expr $INITRDSIZE + $NUMINO / 8 + 512` # enough for ext2 fs + a bit
INITRDSIZE=`expr $INITRDSIZE + $PADDING`
fi

# Making the loopback file with the correct size.
echo "$cmd -- making loopback ramdisk file ($INITRDSIZE kB)"
dd if=/dev/zero of=$DEVRAM count=$INITRDSIZE bs=1024 > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "$cmd -- ERROR creating loopback file"
fi

# Ext2 can only have 8 * blocksize inodes per group, so we may need to
# increase the number of groups created if there are lots of inodes.
if [ $NUMINO -gt $INITRDSIZE ]; then
if [ $NUMINO -gt 8192 ]; then
BPG=`expr $INITRDSIZE \* 8192 / $NUMINO`
INODE_OPT="-g `expr $BPG + 8 - $BPG % 8` -N $NUMINO"
else
INODE_OPT="-N $NUMINO"
fi
else
INODE_OPT="-i `expr $INITRDSIZE \* 1024 / $NUMINO`"
fi

# Makes the ramdisk filesystem (ext2)
echo "$cmd -- making ram disk filesystem ($NUMINO inodes)"
mke2fs -F -m0 $INODE_OPT $DEVRAM $INITRDSIZE
if [ $? -ne 0 ]; then
echo "$cmd -- ERROR making ram disk filesystem"
echo "$cmd -- ERROR you need to use mke2fs >= 1.14 or increase INITRDSIZE"
fi

# Make the mountpoint for the loopback mounting
mkdir $TMPMNT
if [ $? -ne 0 ]; then
echo "$cmd -- ERROR making $TMPMNT"
fi

# Mount the ramdisk file to the temporary mountpoint
echo "$cmd -- mounting ram disk filesystem"
mount -o loop $DEVRAM $TMPMNT
if [ $? -ne 0 ]; then
echo "$cmd -- ERROR mounting $DEVRAM on $TMPMNT"
fi

# Remove the unnecessary "lost+found" directory
rmdir $TMPMNT/lost+found
if [ $? -ne 0 ]; then
echo "$cmd -- ERROR removing $TMPMNT/lost+found"
fi

# Copy the files to the mounted ramdisk
echo "$cmd -- copying initrd files to ram disk"
find | cpio -pdm $TMPMNT
if [ $? -ne 0 ]; then
echo "$cmd -- ERROR cpio to ram disk"
fi

# Unmount the ramdisk from the temporary location
echo "$cmd -- ummounting ram disk"
umount $DEVRAM
if [ $? -ne 0 ]; then
echo "$cmd -- ERROR umounting $DEVRAM"
fi

if [ -e $RESULTINGFILE ]; then
echo "WARNING -- $RESULTINGFILE exists, removing"
rm -rf $RESULTINGFILE
fi

# Create the final initrd file, compressing it.
echo "$cmd -- creating compressed initrd $INITRD"
dd if=$DEVRAM bs=1k count=$INITRDSIZE 2>/dev/null | gzip -9 > $RESULTINGFILE
if [ $? -ne 0 ]; then
echo "$cmd -- ERROR creating $RESULTINGFILE"
fi

# Remove the temporary mountpoint, and the temporary ramdisk
rm -rf $DEVRAM $TMPMNT
if [ $? -ne 0 ]; then
echo "$cmd -- ERROR removing $DEVRAM and $TMPMNT"
fi


I'm posting this to complete the thread, and in case anyone else is sitting there at 3am wondering how to make a correct initrd from the gentoo rescue.gz :)

By the way, I copied over vi and cfdisk. Both work great under there. I ran ldd across them and copied over the libraries, but I think it was only one missing.
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Wed Sep 11, 2002 7:19 am    Post subject: Reply with quote

Oh dear lord...
I have to write 9/11 on this cd...
I should have waited to turn it until the 12th :D

Sorry, just a little bit of anguish over the CNN/MSNBC/<insert other news source> broadcastings recently that is going to haunt everyone who sees that cd and asks me questions every single time they see it.

I'll just write the 10th.. It's just a small lie.
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Thu Sep 12, 2002 2:07 am    Post subject: Reply with quote

arkane wrote:
I'll just write the 10th.. It's just a small lie.

...well, it was 9/10, somewhere on Earth, was it not? :roll:
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
mksoft
l33t
l33t


Joined: 28 May 2002
Posts: 844

PostPosted: Thu Sep 12, 2002 2:45 pm    Post subject: Reply with quote

arkane wrote:
of course I burnt it after that and tested it under vmware to see if it did it's thing. Sure enough, it did. Tho partimage has problems, but thats to be expected. It had problems even before that lol.


Here's a tip to save you some cd's:
You don't have to burn the image in order to test it with vmware.
VMware has to abillity to use an existing iso file as if it was a cdrom. Just point your cd device configuration to that file.

You can do that even while the system is running. Disconnect the device, point it with the config editor to the iso file and reconnect it. Instant CD :-)
_________________
There's someone in my head but it's not me - Pink Floyd
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Thu Sep 12, 2002 3:38 pm    Post subject: Reply with quote

Well hell, I never thought of that... that's pretty nifty.

Thanks for that bit of information!
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Sat Oct 05, 2002 6:54 pm    Post subject: Reply with quote

Well now.. I actually used the cd I burnt, trying to restore my other computer! The problem is.. I tried mkdir /mnt/gentoo, and it wouldn't let me do that, saying the disk was full. but it had 1.5 mb free in the ramdisk. (nearly identical to the gentoo boot cd amount).

I was able to boot with the gentoo cd, and just swap disks, then use the disk I burnt to dump the .bz2 image I created to the disk. But, I was wondering what would cause this? hmm...
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Sun Oct 06, 2002 9:58 pm    Post subject: Reply with quote

So this means that I can upgrade isolinux on my LiveCD to 1.76 which has fixes for my toshiba laptop... so I could actually install Gentoo on my laptop as well... That isolinux hang is SO annoying..

This sounds to good to be true...

/me hands Arkane a beer - thx buddy - you made my day.
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Mon Oct 07, 2002 4:41 am    Post subject: Reply with quote

Theoretically, yeah, you can do it.
Thx, can really handle a beer right now LOL... now to figure out why the ramdisk filesystem is saying it's full when it isn't.
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Sat Oct 12, 2002 6:48 pm    Post subject: Reply with quote

I just got some time to do some checks on the disk in vmware!

alright.. here's the jist:
after booting, I try to create a directory in /mnt called gentoo. (none exists)
it tells me: Cannot create directory '/mnt/gentoo': No space left on device.

mount gives me the following output:
rootfs on / type rootfs (rw)
/dev/root on / type ext2 (rw)
devfs on /dev type devfs (rw)
none on /proc type proc (rw)

/dev/root is a symlink to /dev/rd/0
I can however mount the cdrom onto an existing directory.
If I do:

echo "haha" > /test.txt

it tells me again that there is no space left on the device.
however, df -m tells me I have 3 megs free on the / partition. (usage: 85%)

What can I check, or do to even get a handle on this? I need to be able to write to the ramdisk when I use it as a rescue cd on my systems because I use LVM. (needs to write files to the /etc directory when vgscan is ran)

EDIT: Oh yes.. here's the information in my isolinux.cfg file (for boot params and such)
Code:

DEFAULT kernel
APPEND devfs=nomount vga=normal load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=25000 initrd=rescue.gz root=/dev/ram0 rw
DISPLAY message.txt
PROMPT 1


There's more in there, but thats for the other options which I don't use, but are direct copies from the gentoo cd.

The Gentoo 1.1 isolinux.cfg reads:
Code:

DEFAULT kernel
APPEND devfs=nomount vga=normal load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=22000 initrd=rescue.gz root=/dev/ram0 rw
DISPLAY message.txt
PROMPT 1
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Mon Oct 21, 2002 6:14 am    Post subject: Reply with quote

So, onward with more testing, I've taken the whole approach differently and just used the gentoo 1.2 cd isolinux directory and slapped it into my test partition. Then, I took my .bz2 file and replaced the stage1 with that. (the old way was just different by a little, I replaced the isolinux/rescue.gz and the bz2 file)

It booted alright, everything works fine... so, I know it's my creation of the initrd file (rescue.gz) that is causing the problem with the disk being "full". Currently, the available space is 2123 bytes on the gentoo ramdisk, which is about the same as when I created my initrd file.

So... I'm at a loss. I'm not sure what I could have done that would cause the disk to be "full" with approximately 3 megs free.

Anyone who has successfully created an initrd care to comment on how you did it?

Yeah.. I'm one of those people that get into something and refuse to give up until I complete it... this is purely on principle, now... it has to be able to be done, and I'll do it!

EDIT: The 2123 bytes should read 2123 KILObytes....
my mistake.
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Fri Oct 25, 2002 3:14 am    Post subject: Reply with quote

Okay, this is very wierd.
I have a test partition where I do everything, and made a test loopback device, and a loopback device for the original rescue.gz. I mounted both of them (test and original), went to the original and did a "find | cpio -pdm ../test-loop". Went fine, made sure I bumped up the ramdisk size in the isolinux/isolinux.cfg file to 25000, and recreated the cd.iso (I've gotten to the point of automating everything.. jesus)
Well, I opened vmware, and everything worked great with the new rescue.gz... I haven't copied anything new into it, but it's a brand new image so it's about the same.

I'll have to examine that script to see if it did anything wrong.
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Fri Oct 25, 2002 11:09 pm    Post subject: Reply with quote

Well, I copied the partimage stuff, cfdisk, and vi into the rescue.gz, and made the cd image, and it worked. It looks like my creating a directory, copying the original rescue.gz image into it with "find | cpio -pdm <new rescue image directory>" did the trick. Now, to figure out how to determine the size needed by the files on a ramdisk image so that I can create it via a script. Has to be some sort of math to it, other than a du -s :)
Back to top
View user's profile Send private message
Severcore
n00b
n00b


Joined: 07 Dec 2002
Posts: 10
Location: Belton, TX

PostPosted: Mon Jan 06, 2003 4:37 pm    Post subject: /etc/init.d/rcS Reply with quote

Arkane. Been following several of your threads and have found them very useful. The company I work for is launching a new manufacturing system with 30 computers running gentoo. What we want is to have a cd that can easily restore these systems. I have succesfully got this to work by reading your thread as well as securiteazes thread.

I was wondering if you, or anyone who is reading this, has successfully altered the rcS script. I am wanting to add in some lines, to bring up dhcpcd as well as get rid of the language selection menu all together. When I gzip the alteration and remake my iso the file is still changed. But when I boot my image, it reverts to the old file. I have even tried deleteing that file all together only to find it put it right back in. Is this file doing nothing? Where should I look to find the primary source of this file?

My thanks to all you guys who have brougt me this far. Sorry for ressurecting such an old thread, but this seemed to be the most appropriate place for it.

-Sev
Back to top
View user's profile Send private message
Severcore
n00b
n00b


Joined: 07 Dec 2002
Posts: 10
Location: Belton, TX

PostPosted: Mon Jan 06, 2003 9:22 pm    Post subject: Oh my!! Reply with quote

Yeah, um... I was booting from the wrong iso. No wonder nothing was chaning!!! Argg. :oops: :oops: :oops: I must have booted from the same iso 50 times in a row. Making changes all the way. I just *thought* that backup copy was a good idea. :D OL. At least I got it going. Thanks again for the good info guys.
Back to top
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Mon Aug 25, 2003 6:56 am    Post subject: Reply with quote

Lovechild wrote:
So this means that I can upgrade isolinux on my LiveCD to 1.76 which has fixes for my toshiba laptop... so I could actually install Gentoo on my laptop as well... That isolinux hang is SO annoying..

This sounds to good to be true...

/me hands Arkane a beer - thx buddy - you made my day.


I *JUST* finished getting a LiveCD to work. (needed to get a BBC for work going)

I followed this url: http://www.linuxmafia.com/~rick/linux-info/bbc-modification

It worked perfectly.

Code:

If all you want to do is add already compiled binaries to BBC iso, then I
suggest first, booting a BBC, getting it onto the network, starting sshd
and then scping your binaries over to the running BBC and testing to see
if it will run.

If it runs and you want to incorporate it into your own image, here's what
to do.



#####################################################
# aquire an LNX-BBC iso image
mkdir EXPERIMENTING
cd EXPERIMENTING
wget http://xcssa.org/files/lnx-bbc-1.618.iso

# mount the iso as a loopback filesystem
mkdir tmp-cdrom
sudo mount -o loop lnx-bbc-1.618.iso tmp-cdrom/

# extract the big file called "singularity" using the
# "extract_compressed_fs" program provided
cd tmp-cdrom
./extract_compressed_fs singularity > ../UNCOMPRESSED_singularity

# mount that filesystem
cd ..
mkdir tmp-cloop
sudo mount -o loop UNCOMPRESSED_singularity tmp-cloop/

# copy those filesystems to your disk and discard the rest
rsync -plarv tmp-cloop/ cloop/
rsync -plarv tmp-cdrom/ cdrom/
sudo umount tmp-cloop
sudo umount tmp-cdrom
rm UNCOMPRESSED_singularity
rm -r tmp-cloop tmp-cdrom

# Doing an 'ls' in this directory will now look like:
# root@bosc:/home/ascott/EXPERIMENTING$# ls
# cdrom/  cloop/  lnx-bbc-1.618.iso
# root@bosc:/home/ascott/EXPERIMENTING$#
# "cdrom/" has all the contents of the actually iso, as if you copied the
# mounted cdrom itself to a directory (which we actually did)
# "cloop/" has the / of the compressed loop back filesystem

# NOW, go tweak in cloop.
# Put new binaries in bin and needed libs in lib, etc, oh and etc...
:::Insert your own magic here:::
echo "MAGIC HAPPENS!!"

# When you are done tweaking cloop, adding your binaries and suchness,
# generate a new file of approx. 3 times the size of your media (50meg
# media, make a 150meg filesystem, mount *it* in loopback and then rsync
# your contents of cloop onto

# create 150meg file
dd if=/dev/zero of=new-filesystem bs=1024k count=150
# generate a filesystem on the 150meg file
/sbin/mke2fs -i 1024 -m 0 -b 4096 new-filesystem
# mount and copy stuff
mkdir tmp
sudo mount -o loop -t ext2 new-filesystem tmp/
rsync -plarv cloop/ tmp/
sudo umount tmp/
rm -rf tmp/

# Some more magic happens next:
# Rusty Russle originally wrote this utility that Klaus Knopper has been
# taking care of late, that you will need to download and install.
# It includes the programs "create_compressed_fs" and
# "extract_compressed_fs", as well as the cloop.o module (which gets
# loaded into the kernel while the disk is booting).  You'll need it
# to compress the filesystem for the BBC

# download and compile cloop sources
wget http://www.knopper.net/download/knoppix/cloop_0.63-2.tar.gz
tar -xvzf cloop_0.63-2.tar.gz && cd cloop-0.63
make KERNEL_DIR=/usr/src/linux # (or wherever you keep your kernel source)

# note: there are more instructions here for installing the resulting
# cloop.o module to your local system or bootable image, but this is not
# needed for the intent of these instructions.

# You should now have a copy create_compressed_fs available

# compress your filesystem
cp create_compressed_fs ../
cd ../
./create_compressed_fs new-filesystem 16384 2>&1 > new-singularity
# 16384 is blocksize in bytes
cp -f new-singularity cdrom/singularity
chmod a+x cdrom/singularity

# Now make a new bootable iso out of your "cdrom/" directory
/sbin/mkisofs -v -d -N -D -R -T -c boot.catalog -b lnx.img -A "Linux" -V
"LNX" -P "version_1.618_modified" -o new_bbc.iso
###################################


The process above is only one way to go about generating a custom iso.  I
do nothing to mention all the various scripts that have been created to
simplify this process.  Nor, do I pretend to go into all the very
interesting and valid discussions about how to make more efficient isos by
changing blocksizes, inode counts, using different filesystems, etc...

If you don't know what all the commands are and the options (especially
that bizarro mkisofs (not bizarro to me) command that I ganked from the
"create_iso" script that the early developers had pioneered years ago),
please spend some time looking them up in man pages, because doing so will
be a very quick way to learn what is going on and why certain things are
done the way they are done!  You can learn a lot from a man page.

I hope this is useful to someone.  Let me know if you have any questions.

-Andrew


I hope this helps someone as much as it's helped me. I used the lnx-bbc distro because I needed to stay very small. but, its the same technology gentoo uses for LiveCD.
Back to top
View user's profile Send private message
Ssl
Apprentice
Apprentice


Joined: 21 Feb 2003
Posts: 178
Location: Serbia

PostPosted: Tue Aug 26, 2003 12:13 pm    Post subject: Reply with quote

Hello Arkane and all other gentoo friends!

Can someone help me with this:
I have downloaded experimental gentoo livecd [16.7.2003] and want to make custom livecd (actually just want to put gnome 2.4beta1 on it instead 2.2.1 to help to numerous translators who want to check serbian GNOME translation (100% finished but not polished). It is urgent cause Gnome 2.4final is coming out very soon (probably 10th sept.)

Read whole thread and especially last message was very helpfull (bbc way). I did this way: I have followed nearly all instructions and
burned livecd. It booted well but I get this message after it said it found/detected USB stuff present in my pc

mount: Mounting /dev/cloop in /newroot/mnt/cloop failed : No such device or address

cp: etc : No such file or directory
cp: root: No such file or directory
cp: home: No such file or directory
cp: var: No such file or directory
cp: chroot: No such file or directory

Kernel panic: Attempted to kill init

It is important that I added nothing to livecd.cloop at all. In first pass I just wanted to uncompress that .cloop and compress back just to ensure it can be done that way.

---
Normal gentoo experimental live cd at this point print:
INIT: version 2.84 booting
...and so on
Also mount says:
/mnt/cdrom/livecd.cloop 1.5G 1.1G 251M 82% /mnt/cloop
---

Any idea about this. Sorry I now this is very incomplete but I can bring details about this if someone can help.

BTW. That experimental cd is great! Thank you gentoo developers. Until now I couldn't use it only on one machine. (nVidia && usb problems). Preparing bug report and I'll post that very soon...

PS. There is isolinux.doc file in syslinux archive and it was very helpfull and it was only and last step I did outside these "bbc" instructions before I burned iso image with xcdroast.

Thank you for your reply and help
Slobodan Sredojevic
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum