Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[mini-HowTo] Gentoo Linux LiveCD for Dummies!
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 12, 13, 14 ... 19, 20, 21  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Illissius
Guru
Guru


Joined: 31 Jul 2004
Posts: 395
Location: Hungary

PostPosted: Tue Apr 05, 2005 5:07 pm    Post subject: Reply with quote

OK, here's my current build and linuxrc and other stuff, for those who want to play with it, before I start changing it all around (problem is mksquashfs takes forever, so I'm experimenting in large chunks).

Code:
# cat build
#!/bin/bash
rm -rf target
mkdir target
cp -a isolinux target/
rm -rf source/var/tmp/*
rm -rf source/var/run/*
rm -rf source/var/lock/*
rm -rf source/tmp/*
rm -f source/etc/mtab
touch source/etc/mtab
mksquashfs source/ target/source.img -e usr/src usr/share/doc usr/share/man boot
mkisofs -R -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 4 -hide boot.catalog -o /livecd/livecd.iso target/

# ls isolinux/
display.txt  initrd  isolinux.bin  isolinux.cfg  vmlinuz

# cat isolinux/isolinux.cfg
DEFAULT LinuKS
DISPLAY display.txt
TIMEOUT 100
PROMPT 1
LABEL LinuKS
    KERNEL vmlinuz
    APPEND cdroot initrd=initrd root=/dev/ram0 rw init=/linuxrc video=vesafb-tng:ywrap,mtrr,800x600@70 splash=verbose,theme:emergence CONSOLE=/dev/tty1
LABEL LinuKS-debug
    KERNEL vmlinuz
    APPEND cdroot initrd=initrd root=/dev/ram0 rw init=/bin/sh video=vesafb-tng:ywrap,mtrr,800x600@70 splash=verbose,theme:emergence CONSOLE=/dev/tty1
LABEL LinuKS-qemu
    KERNEL vmlinuz
    APPEND cdroot initrd=initrd root=/dev/ram0 rw init=/linuxrc video=vesafb-tng:ywrap,mtrr,800x600@70 splash=verbose,theme:emergence CONSOLE=/dev/tty1 clock=pit
LABEL LinuKS-qemu-debug
    KERNEL vmlinuz
    APPEND cdroot initrd=initrd root=/dev/ram0 rw init=/bin/sh video=vesafb-tng:ywrap,mtrr,800x600@70 splash=verbose,theme:emergence CONSOLE=/dev/tty1 clock=pit

//I haven't gotten gensplash actually working yet

# mkdir initrd; mount -o loop isolinux/initrd initrd/
# ls -lR initrd/       /* created by merging the geninitramfs initrd with the one in the howto + custom modifications */
initrd/:
total 11
drwxr-xr-x  2 root root 1024 Apr  3 19:07 bin
drwxr-xr-x  2 root root 1024 Apr  2 23:09 cdrom
drwxr-xr-x  5 root root 1024 Apr  3 00:52 dev
drwxr-xr-x  3 root root 1024 Apr  3 00:53 etc
drwxr-xr-x  3 root root 1024 Apr  3 19:07 lib
-rwxr-xr-x  1 root root  940 Apr  3 20:56 linuxrc
drwxr-xr-x  2 root root 1024 Apr  2 23:09 new
drwxr-xr-x  2 root root 1024 Apr  2 23:09 proc
drwxr-xr-x  2 root root 1024 Apr  3 00:53 root
drwxr-xr-x  2 root root 1024 Apr  3 00:53 sbin
drwxr-xr-x  2 root root 1024 Apr  3 00:53 sys

initrd/bin:
total 1483
-rwxr-xr-x  1 root root 304852 Apr  3 18:47 awk
-rwxr-xr-x  1 root root  23532 Apr  2 23:11 cat
-rwxr-xr-x  1 root root  19296 Apr  2 23:11 chroot
-rwxr-xr-x  1 root root  57348 Apr  3 18:49 du
-rwxr-xr-x  1 root root  32508 Apr  2 23:11 mkdir
-rwxr-xr-x  1 root root  85460 Apr  3 18:11 modprobe
-rws--x--x  1 root root  82356 Apr  2 23:11 mount
-rwxr-xr-x  1 root root   5916 Apr  2 23:11 pivot_root
-rwxr-xr-x  1 root root 843748 Apr  2 23:11 sh
-rws--x--x  1 root root  44340 Apr  2 23:11 umount

initrd/cdrom:
total 0

initrd/dev:
total 3
crw-r--r--  1 root root  5,  1 Apr  2 23:14 console
drwxr-xr-x  2 root root   1024 Apr  3 00:52 fb
brw-r--r--  1 root root  3,  0 Apr  2 23:14 hda
brw-r--r--  1 root root  3, 64 Apr  2 23:14 hdb
brw-r--r--  1 root root 22,  0 Apr  2 23:14 hdc
brw-r--r--  1 root root 22, 64 Apr  2 23:14 hdd
brw-r--r--  1 root root  7,  0 Apr  2 23:14 loop0
drwxr-xr-x  2 root root   1024 Apr  3 00:52 misc
crw-rw-rw-  1 root root  1,  3 Apr  2 23:14 null
crw-rw-rw-  1 root root  4,  0 Apr  2 23:14 tty
drwxr-xr-x  2 root root   1024 Apr  3 00:52 vc

initrd/dev/fb:
total 0

initrd/dev/misc:
total 0

initrd/dev/vc:
total 0

initrd/etc:
total 1
-rw-r--r--  1 root root    0 Apr  2 23:10 fstab
-rw-r--r--  1 root root    0 Apr  2 23:10 mtab
drwxr-xr-x  3 root root 1024 Apr  3 00:53 splash

initrd/etc/splash:
total 1
drwxr-xr-x  3 root root 1024 Apr  3 00:53 emergence

initrd/etc/splash/emergence:
total 3
-rw-r--r--  1 root root 1083 Apr  3 00:53 800x600.cfg
drwxr-xr-x  2 root root 1024 Apr  3 00:53 images

initrd/etc/splash/emergence/images:
total 376
-rw-r--r--  1 root root  76287 Apr  3 00:53 silent-800x600-256.png
-rw-r--r--  1 root root  16947 Apr  3 00:53 silent-800x600.jpg
-rw-r--r--  1 root root 232630 Apr  3 00:53 verbose-800x600-240.png
-rw-r--r--  1 root root  52837 Apr  3 00:53 verbose-800x600.jpg

initrd/lib:
total 1568
-rwxr-xr-x  1 root root   96952 Apr  3 13:10 ld-linux.so.2
-rwxr-xr-x  1 root root   32364 Apr  2 23:13 libblkid.so.1
-rwxr-xr-x  1 root root 1271360 Apr  2 23:12 libc.so.6
-rwxr-xr-x  1 root root   10976 Apr  2 23:12 libdl.so.2
-rwxr-xr-x  1 root root  165032 Apr  3 18:48 libm.so.6
-rwxr-xr-x  1 root root   15028 Apr  2 23:13 libuuid.so.1
drwxr-xr-x  3 root root    1024 Apr  3 18:09 modules

initrd/lib/modules:
total 1
drwxr-xr-x  3 root root 1024 Apr  3 19:51 2.6.11-morph5

initrd/lib/modules/2.6.11-morph5:
total 102
drwxr-xr-x  2 root root   1024 Apr  3 18:10 fs
-rw-r--r--  1 root root 102227 Apr  3 19:51 modules.dep

initrd/lib/modules/2.6.11-morph5/fs:
total 219
-rw-r--r--  1 root root 222751 Apr  3 18:10 unionfs.ko

initrd/new:
total 0

initrd/proc:
total 0

initrd/root:
total 0

initrd/sbin:
total 427
-rwxr-xr-x  1 root root 433380 Apr  3 00:53 splash_helper

initrd/sys:
total 0

# cat initrd/linuxrc
#!/bin/sh
export PATH=/bin

# Get kernel CMDLINE and total physical memory / 4
mount -t proc none /proc
CMDLINE=`cat /proc/cmdline`
RDSIZE=`du -m /proc/kcore | awk '{ print $1 / 4 }'`M
umount /proc

# Mount CD device
CDROM=""
for x in hda hdb hdc hdd cdroms/cdrom0 cdroms/cdrom1 cdroms/cdrom2 cdroms/cdrom3
do
  mount -t iso9660 -r /dev/${x} /cdrom > /dev/null 2>&1
  if [ "$?" = "0" ]
  then
    CDROM="${x}"
    break
  fi
done

# CD not found
if [ "${CDROM}" == "" ]
then
  exec /bin/sh
  exit
fi

# Mount root and create read-write directories
modprobe unionfs
mount -t squashfs -o loop /cdrom/source.img /new > /dev/null 2>&1
mount -t tmpfs -o size=$RDSIZE none /new/ramdisk > /dev/null 2>&1
mount -t unionfs -o dirs=/new/ramdisk=rw:/new=ro none /new > /dev/null 2>&1

# Pivot root and start real init
cd /new
pivot_root . oldroot
exec chroot . /bin/sh <<- EOF >dev/console 2>&1
exec /sbin/init ${CMDLINE}
EOF

I can't quite remember all the changes I've done, so it's possible I missed something.

Planned modifications:
- see if putting the tmpfs/unionfs part of it in fstab works
- experiment with multisession discs, iso9660 in one session and udf (or maybe even a normal fs? mkisofs doesn't say you can't...) in the other, to save the unionfs 'overlay' (8))
- figure out how the whole dmix thing works
- captive-ntfs
- other stuff I've probably forgotten

questions:
- what's the highest hdparm settings i586-era hardware can safely be expected to support?
gentoo handbook wrote:
Activate Safe Performance Options: # hdparm -d 1 -A 1 -m 16 -u 1 - a 64 /dev/hda

For example, is that safe to use on anything Pentium or later? (everything is compiled i586 anyways so earlier doesn't interest me.) What about CDROMs? Can the same settings be used?
- the only device found by media:/ in KDE was /dev/loop0, with +hal in USE, HAL installed and in the default bootlevel, and the media manager kdaemon enabled. what gives? do I have to do any special configuration for HAL to work properly?
- livecd-tools contains opengl-update-livecd. what's the difference between it and vanilla opengl-update? (speaking of which, the various autodetection scripts detected and loaded the proprietary nvidia drivers automatically, with no intervention on my part -- hopefully they do the same for ATi, can't test it myself) EDIT - seems this is just used internally by x-setup, so don't have to concern myself with it...
- how much size reduction does compiling with -Os (vs -O2) usually yield? is it safe? should I use it?
- oh, another. is it possible to change the fbsplash resolution once it's already set? ideally I'd like to have it use the same settings autodetected by the X detection scripts... (mkxf86config, x-setup, et al)

to be updated as I remember the rest of the stuff I was going to ask...
_________________
Work is punishment for failing to procrastinate effectively.
last.fm
Back to top
View user's profile Send private message
univac^
Apprentice
Apprentice


Joined: 19 Sep 2004
Posts: 231
Location: Suwalki, Polska

PostPosted: Wed Apr 06, 2005 5:43 pm    Post subject: Reply with quote

Hi
I make it but when i booting live cd i have kernel panic (dev/console is isn't in rw mode) in 41 line of linuxrc, its 41 line
Code:
exec chroot . /bin/sh <<- EOF >dev/console 2>&1

How can i fix it? :(
_________________
Gentoo own3d
Back to top
View user's profile Send private message
Illissius
Guru
Guru


Joined: 31 Jul 2004
Posts: 395
Location: Hungary

PostPosted: Wed Apr 06, 2005 7:37 pm    Post subject: Reply with quote

univac^ wrote:
Hi
I make it but when i booting live cd i have kernel panic (dev/console is isn't in rw mode) in 41 line of linuxrc, its 41 line
Code:
exec chroot . /bin/sh <<- EOF >dev/console 2>&1

How can i fix it? :(

mount -o loop initrd somedir
chmod +rw somedir/dev/console (or a+rw?)
umount somedir

(I had permissions problems with /dev/null as well, so might want to change that also.)
_________________
Work is punishment for failing to procrastinate effectively.
last.fm
Back to top
View user's profile Send private message
Shiner_Man
Apprentice
Apprentice


Joined: 09 Mar 2004
Posts: 180

PostPosted: Thu Apr 07, 2005 2:44 pm    Post subject: Reply with quote

Wow this guide is totally awesome. I need to create a livecd for my job that will join a windows domain so I can recover files off a busted hard drive and put them up on the network shares. I think this might help.
_________________
My Site
Back to top
View user's profile Send private message
gieltje
n00b
n00b


Joined: 14 Aug 2004
Posts: 52

PostPosted: Sun Apr 10, 2005 6:36 pm    Post subject: kernel (cd)/boot/vmlinuz Reply with quote

I guess;


title=Gentoo Linux
root (cd)
kernel (cd)/boot/vmlinuz video=vesafb:1024x768-32 root=/dev/ram0 rw init=/linuxrc cdroot
initrd (cd)/boot/initrd

should be


title=Gentoo Linux
root (cd)
kernel /boot/vmlinuz video=vesafb:1024x768-32 root=/dev/ram0 rw init=/linuxrc cdroot
initrd /boot/initrd
:oops:

Because my grub just keeps reapearing as a command line, if I enter the commands manualy my system boots with only 1 error, and that for my first run :twisted:

Damn that doesnt work as well, can anyone help me to get grub working?
I have allready read this entire thread.

And is there a way to make the cd eject just before shutdown or restart?
Back to top
View user's profile Send private message
gctaylor
n00b
n00b


Joined: 20 Nov 2004
Posts: 40

PostPosted: Mon Apr 11, 2005 2:31 am    Post subject: Another user stuck at grub> Reply with quote

When I follow the instructions (and seemingly follow the tips in this
thread), I can't get my CD to boot past the grub command line. When I try to
use grub manually by doing this:

Code:

grub>  root (cd)
grub>  kernel (cd)/boot/vmlinuz   root=/dev/ram0 rw init=/bin/sh cdroot initrd
(cd)/boot/initrd
grub> boot


I get part way into the boot but end with a

Code:

UDF-fs No partition found (1)
Kernel panic -not syncing: VFS: unable to mount root fs on uknown block (1,0)


Can anyone give me a clue as to whether this is the correct order or what
should come next, or last? I'm kind of lost on some of this.

I can mount my initrd via loop?

I have four ramdisks of 32768k each

Here are what I think are the correct kernel options.
CONFIG_SQUASHFS=y
CONFIG_ISO9660_FS=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_EXT2_FS=y
CONFIG_TMPFS=y


Code:

# cat /boot/grub/grub.conf
default 0
timeout 5
splashimage=(cd)/boot/grub/splash.xpm.gz

title=Gentoo Linux
        root (cd)
   #       kernel (cd)/boot/vmlinuz video=vesafb:1024x768-32
   #       root=/dev/ram0 rw init=/linuxrc cdroot
           kernel /boot/vmlinuz root=/dev/ram0 rw init=/bin/sh cdroot
      initrd /boot/initrd


# cat ./build.sh

Code:

#!/bin/bash
rm -rf target
mkdir target
cp -a source/boot target/
mkdir target/files
rm -rf source/var/tmp/*
rm -rf source/var/run/*
rm -rf source/var/lock/*
rm -rf source/tmp/*
rm -f source/etc/mtab
touch source/etc/mtab
cd source/etc/
tar cvpf ../../target/files/etc.tar * .[[:alnum:]]*
cd ../var/
tar cvpf ../../target/files/var.tar * .[[:alnum:]]*
cd ../root/
tar cvpf ../../target/files/root.tar * .[[:alnum:]]*
cd ../../

rm ./livecd.iso

mksquashfs source/ target/files/source.img -info -e usr/src -e usr/portage -e
usr/share/doc usr/share/man

mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size \
4 -boot-info-table -iso-level 4 -hide boot.catalog -o ./livecd.iso target/

/usr/bin/cdrecord blank=fast fs=64M -v gracetime=2 dev=/dev/hda speed=4 -tao
-eject -data ./livecd.iso
Back to top
View user's profile Send private message
gieltje
n00b
n00b


Joined: 14 Aug 2004
Posts: 52

PostPosted: Mon Apr 11, 2005 10:25 am    Post subject: Reply with quote

I don't get this, when I start the cd I get the minimal grub bash.
When I run configfile /boot/grub/grub.conf, it runs like a charm.



What Am I doint wrong here??????:roll:

Btw, will grub 0.96-r1 work?
Back to top
View user's profile Send private message
Illissius
Guru
Guru


Joined: 31 Jul 2004
Posts: 395
Location: Hungary

PostPosted: Mon Apr 11, 2005 2:39 pm    Post subject: Re: Another user stuck at grub> Reply with quote

gctaylor wrote:
Code:

UDF-fs No partition found (1)
Kernel panic -not syncing: VFS: unable to mount root fs on uknown block (1,0)


From this one gets the impression that you might've accidentally burned the disk as UDF (ie packet write) instead of iso9660 (or alternately, tried to mount it as such)... if it's not that, then dunno.
_________________
Work is punishment for failing to procrastinate effectively.
last.fm
Back to top
View user's profile Send private message
gieltje
n00b
n00b


Joined: 14 Aug 2004
Posts: 52

PostPosted: Wed Apr 13, 2005 9:29 pm    Post subject: Re: Another user stuck at grub> Reply with quote

I have been working on my own version of scripts for building and working

Here is what I call "work", it simply mounts, chroots, and updates the environment (not sure if the env-update works for some reason);

Code:

mount -o bind /sys source/sys
mount -o bind /dev source/dev
mount -o bind /proc source/proc
chroot source/ /bin/bash --login
env-update
source /etc/profile


And "afterwork", this unmounts and updates the environment back to the normal system
Code:

umount source/sys
umount source/dev
umount source/proc
env-update
source /etc/profile


And finaly "build";
Code:

#!/bin/bash
rm -rf target
mkdir target
cp -a source/boot target/
mkdir target/files
rm -rf source/var/tmp/*
rm -rf source/var/run/*
rm -rf source/var/lock/*
rm -rf source/tmp/*
rm -f source/etc/mtab
touch source/etc/mtab
cd source/etc/
tar cvpf ../../target/files/etc.tar * .[[:alnum:]]*
cd ../var/
tar cvpf ../../target/files/var.tar * .[[:alnum:]]*
cd ../root/
tar cvpf ../../target/files/root.tar * .[[:alnum:]]*
cd ../../
cp /usr/lib/syslinux/isolinux.bin isolinux/
cp source/boot/vmlinuz source/boot/initrd isolinux/
cp -r -a isolinux target/
mkdir target/files/source
cp -p -R -P -d source/ target/files
rm -rf target/files/source/usr/portage
rm -rf target/files/source/usr/lib/portage
rm -rf target/files/source/var/cache
rm -rf target/files/source/usr/share/doc
rm -rf target/files/source/root/.mc
rm target/files/source/root/.bash_history
rm target/files/source/root/.ccache
rm target/files/source/var/log/emerge.log
mksquashfs target/files/source target/files/source.img
rm -rf target/files/source
mkisofs -R -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 4 -hide boot.catalog -o ~/liv$


Now here I have made some major changes, first it depends on IsoLinux, and automates isolinux.
Second it makes a exact copy of the source folder and then removes the documentation (not man files), and a lot of temp files.
Third it REMOVES emerge from the cd, since I find this a useless tool to be on a simple live cd.
This saves me about 60megs.
I am sure there are much more things there can removed, and that there are some flaws in these scripts.

Please give feedback on this.


Last edited by gieltje on Thu Apr 14, 2005 10:17 am; edited 3 times in total
Back to top
View user's profile Send private message
desertstalker
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 209

PostPosted: Thu Apr 14, 2005 2:04 am    Post subject: Reply with quote

I have the same problem as gctaylor. I cannot get it too boot past grub without manually specifying kernel etc. I used the same config file as in the first post (making sure all filenames are correct) but is does not seem to read the config file.

Any ideas?
Back to top
View user's profile Send private message
gctaylor
n00b
n00b


Joined: 20 Nov 2004
Posts: 40

PostPosted: Thu Apr 14, 2005 2:53 am    Post subject: Getting past grub command line - use grub-0.95.20040823 Reply with quote

desertstalker wrote:
I have the same problem as gctaylor. I cannot get it too boot past grub without manually specifying kernel etc. I used the same config file as in the first post (making sure all filenames are correct) but is does not seem to read the config file.

Any ideas?


Just a few hours ago I was able to get past the grub command line and a little further by using the version of grub-0.95.20040823. For overall livecd building I'm using the script from http://www.icu.isa-geek.org/download/livecd and for the grub issue I modified the grub line in there with emerge =grub-0.95.20040823.



Me... I've got a new error I'm working on: Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Back to top
View user's profile Send private message
desertstalker
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 209

PostPosted: Thu Apr 14, 2005 3:04 am    Post subject: Reply with quote

Thanks, ill try that.

EDIT: Nope didnt work
Back to top
View user's profile Send private message
desertstalker
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 209

PostPosted: Thu Apr 14, 2005 6:07 am    Post subject: Reply with quote

Found out what does work to fix the prbolem. If i use menu.lst instaed of grub.conf it works.

Seems the symlink does not work on an iso9660 filesystem.
Back to top
View user's profile Send private message
gieltje
n00b
n00b


Joined: 14 Aug 2004
Posts: 52

PostPosted: Thu Apr 14, 2005 10:54 am    Post subject: Reply with quote

desertstalker wrote:
Found out what does work to fix the prbolem. If i use menu.lst instaed of grub.conf it works.

Seems the symlink does not work on an iso9660 filesystem.


Damn this should be listed on the front page, should save a lot of people a lot of work.
This shitty problem costed me 8 hours :cry:.

And isnt this system supposed to be bootstrapped?
Back to top
View user's profile Send private message
gctaylor
n00b
n00b


Joined: 20 Nov 2004
Posts: 40

PostPosted: Thu Apr 14, 2005 3:39 pm    Post subject: Reply with quote

desertstalker wrote:
Found out what does work to fix the prbolem. If i use menu.lst instaed of grub.conf it works.

Seems the symlink does not work on an iso9660 filesystem.



Could you elaborate on this? I see the symbolic link betwen menu.lst and grub.conf. What did you do exactly?

I seem to be having all kinds of problems

Code:

livecdtwo # mount -o loop livecd_src/boot/initrd livecd_src/mnt/initrd
ioctl: LOOP_CLR_FD: Device or resource busy
mount: you must specify the filesystem type


Code:

livecdtwo # mount
/dev/hdb3 on / type reiserfs (rw,noatime,notail)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev type ramfs (rw)
none on /dev/pts type devpts (rw)
/dev/hdb1 on /boot type ext2 (rw,noatime)
none on /dev/shm type tmpfs (rw)
none on /proc/bus/usb type usbfs (rw)



Thanks,
gary
Back to top
View user's profile Send private message
desertstalker
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 209

PostPosted: Fri Apr 15, 2005 12:54 am    Post subject: Reply with quote

I removed the menu.lst symlink and copied grub.conf to menu.lst so that menu.lst has the same information as grub.conf.

As for the other error you need to run losetup first i believe to create the loop device before you can mount it. Other than that i am not sure, im new to this livecd buisness as well.

Hope this helps.


Last edited by desertstalker on Sat Apr 16, 2005 12:45 am; edited 1 time in total
Back to top
View user's profile Send private message
gieltje
n00b
n00b


Joined: 14 Aug 2004
Posts: 52

PostPosted: Fri Apr 15, 2005 10:00 am    Post subject: Reply with quote

First is there a way to get mingetty NOT display the lines "Login session opened for ........" Because I open al 6 shells which is realy irritating.

Second maybe its an good idea to make a Gentoo-Wiki of it (http://gentoo-wiki.com/HOWTO_Index).

In this way there can be more people editing this howto to keep it up to date, and more people will easily be able to find this guide.

As I find this guide way better (since the grub issue has been solved) then catalyst.
Back to top
View user's profile Send private message
gieltje
n00b
n00b


Joined: 14 Aug 2004
Posts: 52

PostPosted: Sun Apr 17, 2005 8:06 pm    Post subject: Reply with quote

I have made a gentoo wiki of it;

http://gentoo-wiki.com/HOWTO_build_a_LiveCD_from_scratch

I have added my own build script and other nice things. (and a fix for the grub bug)..

Please add other things if I missed something.
Back to top
View user's profile Send private message
drio
n00b
n00b


Joined: 17 Oct 2004
Posts: 47

PostPosted: Tue Apr 19, 2005 12:08 am    Post subject: cannot create temp file for here document Reply with quote

Hi,

I am trying to run my livecd with qemu but every time I get this error:

Code:

pivot_root: not such file or directory
/linuxrc: line 41 : cannot create temp file for here document. read only filesystem.


I am using the original version of the howto. Pivot_root is in the initrd for sure.
Anyone had the same problem?

Thanks.
Back to top
View user's profile Send private message
Kampi
n00b
n00b


Joined: 05 Apr 2003
Posts: 20
Location: Vienna, Austria, Europe

PostPosted: Tue Apr 19, 2005 10:47 am    Post subject: Reply with quote

Illissius wrote:

Code:

RDSIZE=`du -m /proc/kcore | awk '{ print $1 / 4 }'`M



first of all: great "howto", i really like unionfs, but '/4' could be dangerous. in qemu i got
Code:

tmpfs: Bad value '32.25M' for mount option size


i had to use qemu -m 127
Back to top
View user's profile Send private message
Kampi
n00b
n00b


Joined: 05 Apr 2003
Posts: 20
Location: Vienna, Austria, Europe

PostPosted: Tue Apr 19, 2005 11:23 am    Post subject: Re: cannot create temp file for here document Reply with quote

drio wrote:
Hi,

I am trying to run my livecd with qemu but every time I get this error:

Code:

pivot_root: not such file or directory
/linuxrc: line 41 : cannot create temp file for here document. read only filesystem.


I am using the original version of the howto. Pivot_root is in the initrd for sure.
Anyone had the same problem?

Thanks.


do you have created the "newroot" directory? once i forgot this step. if it does not work try to get /bin/sh started (via linuxrc) and type in the mount commands by hand. imho the best method to debug
Back to top
View user's profile Send private message
Illissius
Guru
Guru


Joined: 31 Jul 2004
Posts: 395
Location: Hungary

PostPosted: Tue Apr 19, 2005 4:09 pm    Post subject: Reply with quote

Kampi wrote:
Illissius wrote:

Code:

RDSIZE=`du -m /proc/kcore | awk '{ print $1 / 4 }'`M



first of all: great "howto", i really like unionfs, but '/4' could be dangerous. in qemu i got
Code:

tmpfs: Bad value '32.25M' for mount option size


i had to use qemu -m 127

Hm, thanks for the tip. Apparently, only whole numbers are allowed...
_________________
Work is punishment for failing to procrastinate effectively.
last.fm
Back to top
View user's profile Send private message
drio
n00b
n00b


Joined: 17 Oct 2004
Posts: 47

PostPosted: Tue Apr 19, 2005 5:44 pm    Post subject: Reply with quote

Illissius wrote:
Kampi wrote:
Illissius wrote:

Code:

RDSIZE=`du -m /proc/kcore | awk '{ print $1 / 4 }'`M



first of all: great "howto", i really like unionfs, but '/4' could be dangerous. in qemu i got
Code:

tmpfs: Bad value '32.25M' for mount option size


i had to use qemu -m 127

Hm, thanks for the tip. Apparently, only whole numbers are allowed...


Perhaps this is very dirty bad this is what I did to fix that:

Code:

RDSIZE=`du -m /proc/kcore | awk '{ print $1 / 4 }'`
RDSIZE=`echo $RDSIZE | awk -F. '{print $1}'`
RDSIZE=$[$RDSIZE + 1]
Back to top
View user's profile Send private message
drio
n00b
n00b


Joined: 17 Oct 2004
Posts: 47

PostPosted: Tue Apr 19, 2005 6:00 pm    Post subject: Re: cannot create temp file for here document Reply with quote

Kampi wrote:

do you have created the "newroot" directory? once i forgot this step. if it does not work try to get /bin/sh started (via linuxrc) and type in the mount commands by hand. imho the best method to debug


Ok I have change some stuff (I am using unionfs now. Much better)... and still have the same problem.
I have debug linuxrd and the problem is here:

Code:

exec chroot . /bin/sh <<- EOF >dev/console 2>&1
exec /sbin/init ${CMDLINE}
EOF


It is complainning that there is no space left on the device (cannot create temp file for here document).

I have the oldroot directory on /new/

and I have mounted the devices like this:

Code:

modprobe unionfs
mount -t squashfs -o loop /cdrom/files/jail.img /new > /dev/null 2>&1
mount -t tmpfs -o size=$RDSIZE none /new/ramdisk > /dev/null 2>&1
mount -t unionfs -o dirs=/new/ramdisk=rw:/new=ro none /new > /dev/null 2>&1


Any idea?

UPDATE:

I justed added df to the initrd image and I launched /bin/sh right before pivoting.
df is telling me that /cdrom is 100% , /new is 100% and /new/ramdisk is 100% also.
Back to top
View user's profile Send private message
drio
n00b
n00b


Joined: 17 Oct 2004
Posts: 47

PostPosted: Tue Apr 19, 2005 6:50 pm    Post subject: fixed Reply with quote

Hi,

I finally found the problem. tmpfs was too small. I was using the RDSIZE directly as a parameter to mount. RDSIZE was
32. So i was passing -size=32 as a parameter.
I just changed that to 32m and everything is fine now.
Uff.. finally. :D
Thanks for this howto again, it is really terrific.
I am gonna try to make this through pxe. I will keep you posted.

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 12, 13, 14 ... 19, 20, 21  Next
Page 13 of 21

 
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