View previous topic :: View next topic |
Author |
Message |
skipsargent n00b
Joined: 15 Nov 2004 Posts: 11
|
Posted: Tue Nov 23, 2004 5:49 pm Post subject: |
|
|
Ok so this is what I did for the video. I took that mkxorgconf.sh script and butchered the heck out of it. Since I am planning on using the Vesa drivers all I wanted to do was have proper detection of the monitor. Well it might be ugly but mission accomplished. As soon as I do some more testing on it I will post the script.
On another note, does anyone know if there is a way to keep the boot cd-rom up and spinning? This is a real pain on a slower laptop and seems to cause problems. |
|
Back to top |
|
|
maserding Tux's lil' helper
Joined: 25 Feb 2004 Posts: 132
|
Posted: Tue Nov 23, 2004 8:51 pm Post subject: |
|
|
Hello, I would just like to add a few suggestions to be put into the howot.
1. You should add the trick of booting into /bin/sh for debugging purposes, just to make it easier so people don't have to search through this whole thread.
2. Make sure to have users run passwd, so they can set the root password before they make an image.
3. I had problems with using udev and devfsd together, so make your howto choose one or the other. I suggest choosing udev, which in case you need to make sure to emerge unmerge devfsd, and to not compile in support for devfs.
Besides that, it is a GREAT howto!
Thanks!
Jordan Wilberding |
|
Back to top |
|
|
maserding Tux's lil' helper
Joined: 25 Feb 2004 Posts: 132
|
Posted: Tue Nov 23, 2004 8:52 pm Post subject: |
|
|
Also, I saw people had troubles running their images in vmware, I did too for a while, but using udev, and unmerging devfsd and taking support for it out of the kernel fixed my problem. My problem was that /dev/hdc was not reference correctly as the cdrom. |
|
Back to top |
|
|
rommel Veteran
Joined: 19 Apr 2002 Posts: 1145 Location: Williamsburg Virginia
|
Posted: Wed Nov 24, 2004 6:45 pm Post subject: |
|
|
first thank you for the howto... its very useful. i have a couple of issues and was wondering if anyone was having them as well. i started with stage1 and building the iso i am getting this error... Code: |
tmp/.keep
.keep
tar: *: Cannot stat: No such file or directory
.bash_history
.keep
tar: Error exit delayed from previous errors
Creating little endian filesystem on target/files/source.img, block size 65536. |
it doesnt seem to be effecting anything as the iso works but i am not sure what the error is referring to.
the second thing i noticed is that using "~x86" in make.conf i am not able to emerge grub... it errors with the familiar Code: | ...your c compiler cant create executables | i used quickpkg and emerge -K to get around this... emerge -e world is able to recompile everything but grub..
this is using gcc-3.4.3. i also receive this error with gcc-config even after sourcing /etc/profile and env-update Code: | JaiBaba / # gcc-config -l
* /usr/bin/gcc-config: Profile does not exist or invalid setting for /etc/env.d/gcc/i686-pc-linux-gnu-3.4.3
[1] i686-pc-linux-gnu-3.3.4
[2] i686-pc-linux-gnu-3.4.3 *
[3] i686-pc-linux-gnu-3.4.3-hardened
[4] i686-pc-linux-gnu-3.4.3-hardenednopie
[5] i686-pc-linux-gnu-3.4.3-hardenednossp | possibly related to this bug? #69799....any input would be great... ciao |
|
Back to top |
|
|
loonix Tux's lil' helper
Joined: 18 Nov 2004 Posts: 98 Location: Barrie, Ontario, Canada
|
Posted: Thu Nov 25, 2004 6:15 pm Post subject: |
|
|
Hello:
I am new to Gentoo (however not new to Linux). I was very ingtrigued by the idea having my own live-cd when I saw this post.
I am in the process of following the how-to and have a couple of questions:
Code: | 1. Be concious with USE variables. The more you use, the bigger your envirnoment will get. It might even be so big that it won't fit on a CD! I use kde only, and don't care about docs and java, so I added the follwoing: '-gnome -gtk -java -doc' |
Does this mean I add "USE=-gnome -gtk -java -doc" to my chrooted /etc/make.conf?
Code: | 2. Make sure you add 'livecd' to your USE variables. This, along with a 'cdroot' parameter that we'll pass to the kernel at boot time, will make init scripts aware of the fact that we're booting off a cdrom, so it doesn't do inappropriate things like checking the root filesystem! |
I am not really sure how to add 'livecd' and 'cdroot' to the USE variable. Like above would I then add "USE=-gnome -gtk -java -doc livecd cdroot" to my chrooted /etc/make.conf?
Thanks
AR |
|
Back to top |
|
|
frenkel Veteran
Joined: 13 May 2003 Posts: 1034 Location: .nl
|
Posted: Thu Nov 25, 2004 6:50 pm Post subject: |
|
|
loonix wrote: |
I am not really sure how to add 'livecd' and 'cdroot' to the USE variable. Like above would I then add "USE=-gnome -gtk -java -doc livecd cdroot" to my chrooted /etc/make.conf?
|
Short: Yes
Frank _________________ http://techfield.org |
|
Back to top |
|
|
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Thu Nov 25, 2004 8:14 pm Post subject: |
|
|
loonix wrote: |
Does this mean I add "USE=-gnome -gtk -java -doc" to my chrooted /etc/make.conf?
|
Yest that's true.
Quote: | I am not really sure how to add 'livecd' and 'cdroot' to the USE variable. Like above would I then add "USE=-gnome -gtk -java -doc livecd cdroot" to my chrooted /etc/make.conf?
|
Not quite. livecd is a USE flag that you should add like you describe. But, cdroot is just a parameter that needs to be passed to the kernel at boot time. Look closely at the grub configuration file in the post, it's there. |
|
Back to top |
|
|
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Thu Nov 25, 2004 8:21 pm Post subject: |
|
|
rommel wrote: | first thank you for the howto... its very useful. i have a couple of issues and was wondering if anyone was having them as well. i started with stage1 and building the iso i am getting this error... Code: |
tmp/.keep
.keep
tar: *: Cannot stat: No such file or directory
.bash_history
.keep
tar: Error exit delayed from previous errors
Creating little endian filesystem on target/files/source.img, block size 65536. |
it doesnt seem to be effecting anything as the iso works but i am not sure what the error is referring to.
the second thing i noticed is that using "~x86" in make.conf i am not able to emerge grub... it errors with the familiar Code: | ...your c compiler cant create executables | i used quickpkg and emerge -K to get around this... emerge -e world is able to recompile everything but grub..
this is using gcc-3.4.3. i also receive this error with gcc-config even after sourcing /etc/profile and env-update Code: | JaiBaba / # gcc-config -l
* /usr/bin/gcc-config: Profile does not exist or invalid setting for /etc/env.d/gcc/i686-pc-linux-gnu-3.4.3
[1] i686-pc-linux-gnu-3.3.4
[2] i686-pc-linux-gnu-3.4.3 *
[3] i686-pc-linux-gnu-3.4.3-hardened
[4] i686-pc-linux-gnu-3.4.3-hardenednopie
[5] i686-pc-linux-gnu-3.4.3-hardenednossp | possibly related to this bug? #69799....any input would be great... ciao |
For 'Can't stat..' error, double check the commands syntax. Especially around [[:alnum:]] bit.
For gcc-3.4, I never really got to test it although I'm interested in switching completely to it. |
|
Back to top |
|
|
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Thu Nov 25, 2004 8:23 pm Post subject: |
|
|
maserding wrote: | Also, I saw people had troubles running their images in vmware, I did too for a while, but using udev, and unmerging devfsd and taking support for it out of the kernel fixed my problem. My problem was that /dev/hdc was not reference correctly as the cdrom. |
Thanks maserding for your nice feedback.
I'll modify it soon. |
|
Back to top |
|
|
gungholady Guru
Joined: 19 Oct 2003 Posts: 392
|
Posted: Fri Nov 26, 2004 12:47 pm Post subject: |
|
|
I'm using this excellent how-to to create my own livecd. When I exit out of chroot and do "umount /proc", I get the following message:
umount: /proc: device is busy
umount: /proc: device is busy
The "umount /usr/portage/distfiles" works just fine. Has anyone else had the problem with not being able to unmount /proc? How did you solve it? The only way I've found so far is to reboot my system. I'd like to find another way if possible. |
|
Back to top |
|
|
rommel Veteran
Joined: 19 Apr 2002 Posts: 1145 Location: Williamsburg Virginia
|
Posted: Fri Nov 26, 2004 1:26 pm Post subject: |
|
|
gungholady i think your trying to unmount /proc rather then /livecd/source/proc |
|
Back to top |
|
|
gungholady Guru
Joined: 19 Oct 2003 Posts: 392
|
Posted: Fri Nov 26, 2004 1:52 pm Post subject: |
|
|
rommel wrote: | gungholady i think your trying to unmount /proc rather then /livecd/source/proc |
Thanks, I'll try that.
Edit:
When I try that, here is what I get:
umount: /livecd/source/proc: not found |
|
Back to top |
|
|
rommel Veteran
Joined: 19 Apr 2002 Posts: 1145 Location: Williamsburg Virginia
|
Posted: Fri Nov 26, 2004 2:41 pm Post subject: |
|
|
ok well i am not always as clear as i should but was that the directory struc you created for your livecd build. i was logged in as root from an osx machine and followed the howto literally so in /root i have livecd/source in which the directories are located.
if you mount /proc to the proc in your build dir and then umount it does that work... this would be before chrooting.
Code: | JaiBaba livecd # mount -o bind /proc/ source/proc/
JaiBaba livecd #
JaiBaba livecd # umount source/proc/
JaiBaba livecd # | if you do this does it work? |
|
Back to top |
|
|
gungholady Guru
Joined: 19 Oct 2003 Posts: 392
|
Posted: Fri Nov 26, 2004 3:02 pm Post subject: |
|
|
I'm following the howto exactly too. I'll have to try the umount source/proc later. I'm chrooted at the moment.
Edit:
That did the trick. That's what I was doing was forgetting to put source in front of /proc when trying to unmount it.
Last edited by gungholady on Sat Nov 27, 2004 4:08 am; edited 1 time in total |
|
Back to top |
|
|
neilhwatson l33t
Joined: 06 Feb 2003 Posts: 719 Location: Canada
|
Posted: Fri Nov 26, 2004 8:02 pm Post subject: |
|
|
veezi, very informative Howto. There is something I don't understand. In your script that creates the iso image:
Code: |
...
mksquashfs source/ target/files/source.img
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/
|
At this point I'm at the top level directory where there are three sub directories: build, source and target. The mkisofs command references a sub directory boot at the -b option. Where is that? _________________ The true guru is a teacher.
Neil Watson |
|
Back to top |
|
|
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Fri Nov 26, 2004 11:55 pm Post subject: |
|
|
neilhwatson wrote: | veezi, very informative Howto. There is something I don't understand. In your script that creates the iso image:
Code: |
...
mksquashfs source/ target/files/source.img
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/
|
At this point I'm at the top level directory where there are three sub directories: build, source and target. The mkisofs command references a sub directory boot at the -b option. Where is that? |
Hi,
'build' is a script, not a directory!
The build script copies 'boot/' from 'source/' to 'target/'. The mkisofs -b option is always relative to the directory that you're making an iso image of (the last argument). It's 'target/' in this case. |
|
Back to top |
|
|
The_Paya Developer
Joined: 29 Aug 2003 Posts: 23 Location: Argentina
|
Posted: Sat Nov 27, 2004 12:32 am Post subject: |
|
|
First of all, thanks for the howto, and second, I've had problems with grub to boot from my SCSI CD-ROM on our servers at work, so looking for an alternative (since grub was always a pain in the *ss for me, I've been using lilo for -way-too-long- time) I've found ISOLINUX (which is the current bootloader of the officials gentoo livecds IIRC), and here is the info to make it work (instead of grub) if someone needs it:
First, emerge the "syslinux" package in your system (it can be installed on the livecd, but it isn't neccesary like grub)
Next make a directory 'isolinux' in your livecd path, in the same place where the build/work scripts are/usr/lib/syslinux/ found and the source/ target/ directories reside, and copy the generated image 'isolinux.bin' into this directory:
Code: | # mkdir isolinux
# cp /usr/lib/syslinux/isolinux.bin isolinux/ |
Now you have to copy there your vmlinuz, initrd, the isolinux configuration file and a "message" text file with a "welcome" screen or a boot menu:
Code: | # cp source/boot/vmlinuz source/boot/initrd isolinux/ |
And my "example" configuration:
isolinux.cfg:
Code: | DEFAULT gentoo
DISPLAY display.txt
TIMEOUT 100
PROMPT 1
LABEL gentoo
KERNEL vmlinuz
APPEND initrd=initrd root=/dev/ram0 rw init=/linuxrc video=vesafb:1024x768-32
|
Iif you want more options just add another "LABEL" example:
Code: | LABEL gentoo-nofb
KERNEL vmlinuz-nofb
APPEND initrd=initrd root=/dev/ram0 rw init=/linuxrc |
display.txt:
Code: |
This cd boots my Gentoo LiveCD :+)
|
The next step, is to copy the isolinux directory containing our configuration inside the target/ directory:
Code: | cp -a isolinux target/ |
And the mkisofs line should look like this:
Code: | mkisofs -R -b isolinux/isolinux.bin -no-emul-boot -boot-load-size \
4 -boot-info-table -iso-level 4 -hide boot.catalog -o ~/livecd.iso target/ |
Also, I've managed to boot this with gensplash (or fbsplash, aka the gentoo "bootsplash"), using the "inkernel" patched method (putting the initramfs into /usr/src/linux/usr/initramfs_data.cpio). It looks awesome btw :+P
Salu2. _________________ wherever you go, there you are. |
|
Back to top |
|
|
gungholady Guru
Joined: 19 Oct 2003 Posts: 392
|
Posted: Sat Nov 27, 2004 4:06 am Post subject: |
|
|
veezi wrote: | For X config, there's a script around (I thing it's called makexconfig) that's borrowed from knoppix. It does that.
However, I personally use a generic X config that uses 'vesa' device. It's guaranteed to work on most PCs. |
What did you use to create this generic X config? I have looked at the xorg.conf example, I don't understand from looking at the example what changes I need to make so that it will work with most systems. |
|
Back to top |
|
|
gungholady Guru
Joined: 19 Oct 2003 Posts: 392
|
Posted: Sun Nov 28, 2004 3:26 am Post subject: |
|
|
I used the xorconfig to try to come up with a generic xorg.conf file. I haven't tested it yet to see if it works.
The following error message occurs using the build script:
spool/cron/lastrun/
spool/cron/lastrun/.keep
spool/cups/
spool/cups/tmp/
spool/mail/
spool/mail/.keep
spool/.keep
state/
state/.keep
tmp/
tmp/.keep
.keep
tar: *: Cannot stat: No such file or directory
.bash_history
.gconf/
.gconfd/
.gconfd/saved_state
.gnome/
Is this something that I need to be concerned about? It does go ahead and do the livecd.iso file. |
|
Back to top |
|
|
rommel Veteran
Joined: 19 Apr 2002 Posts: 1145 Location: Williamsburg Virginia
|
Posted: Sun Nov 28, 2004 4:19 am Post subject: |
|
|
no its not a problem... its telling you there is nothing in the root dir to tar up. |
|
Back to top |
|
|
neilhwatson l33t
Joined: 06 Feb 2003 Posts: 719 Location: Canada
|
Posted: Mon Nov 29, 2004 2:11 pm Post subject: |
|
|
veezi wrote: | 'build' is a script, not a directory! |
That is correct. That was a typo. I'm in a diretory that contains the build script and the directories source and target. When I run the build scripts I receive this error:
Code: |
Warning: Creating ISO-9660:1999 (version 2) filesystem.
Warning: ISO-9660 filenames longer than 31 may cause buffer overflows in the OS.
mkisofs: Uh oh, I cant find the boot image 'source/boot/grub/stage2_eltorito' !
|
And yet there is the file:
Code: |
valetta livecd # ls -al source/boot/grub/stage2_eltorito
-rw-r--r-- 1 root root 105928 Nov 26 16:03 source/boot/grub/stage2_eltorito
|
_________________ The true guru is a teacher.
Neil Watson |
|
Back to top |
|
|
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Mon Nov 29, 2004 2:17 pm Post subject: |
|
|
Can you post the build script |
|
Back to top |
|
|
neilhwatson l33t
Joined: 06 Feb 2003 Posts: 719 Location: Canada
|
Posted: Mon Nov 29, 2004 2:26 pm Post subject: |
|
|
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 ../../
pwd
mksquashfs source/ target/files/source.img
mkisofs -R -b source/boot/grub/stage2_eltorito -no-emul-boot -boot-load-size \
4 -boot-info-table -iso-level 4 -hide boot.catalog -o ~/livecd.iso target/
|
_________________ The true guru is a teacher.
Neil Watson |
|
Back to top |
|
|
veezi Apprentice
Joined: 10 Nov 2003 Posts: 226
|
Posted: Mon Nov 29, 2004 2:33 pm Post subject: |
|
|
Use '-b boot/grub/stage2_eltorito' instead of '-b source/boot/grub/stage2_eltorito'
mkiso will append 'target/' to it (that is; the folder you're making an iso image of), and that's where the file should reside (target/boot/grub/stage2_eltorito). |
|
Back to top |
|
|
neilhwatson l33t
Joined: 06 Feb 2003 Posts: 719 Location: Canada
|
Posted: Mon Nov 29, 2004 3:40 pm Post subject: |
|
|
Thanks Veezi, I'm getting closer. Before untaring the stage2 ball in the setup you mention creating the 'newroot' directory in 'source'. The linuxrc script mounts the source.img file at '/new'. Where is this directory new? I could not find it mentioned in your howto. _________________ The true guru is a teacher.
Neil Watson |
|
Back to top |
|
|
|