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 ... 7, 8, 9 ... 19, 20, 21  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
lothar
Tux's lil' helper
Tux's lil' helper


Joined: 10 Mar 2004
Posts: 87
Location: Norway

PostPosted: Fri Jan 28, 2005 10:12 am    Post subject: Reply with quote

Excellent guide :) I was having some problems at first, but I just read the whole thread and the solutions where right there..
Thanks

Edit: Still got one problem.. Im using this livecd to make a mp3player, the computer boots, mounts an nfs filesystem and starts mpg123.. but theres no sound and mpg123 freezes..
The output from mpg123 looks like this:
Code:

High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
Version 0.59s-r9 (2000/Oct/27). Written and copyrights by Michael Hipp.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Title  : kake                          Artist: skrell
Album  :                                 Year  : 2002
Comment:                                 Genre : Other

Playing MPEG stream from xx - xx.mp3 ...
Found new ID3 Header
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz stereo


So It looks normal, this is what usually comes up, but I cant use CTRL-C to stop the program and theres no sound..
Anyone has any idea what this can be?
I've got Portmap in the default runlevel, and I can browse the remote filesystem.

Edit2: It's the hardware, it worked 100% on a different computer..
Back to top
View user's profile Send private message
Match
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 117
Location: England

PostPosted: Fri Jan 28, 2005 4:12 pm    Post subject: Reply with quote

Okay, I've definitely got livecd in my USE flags. But where exactly should the linuxrc be in the initrd? At the moment it's top level (in other words, I mount the initrd and cd /mnt/initrd and it's there).

I've just chmodded +x linuxrc, but stupidly didn't check to see if it'd been set before. I shall go burn it and see what happens.
_________________
O_o
Back to top
View user's profile Send private message
Match
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 117
Location: England

PostPosted: Fri Jan 28, 2005 4:40 pm    Post subject: Reply with quote

It seems that linuxrc wasn't set to executable before because with that one change, I now get different errors:

Code:
VFS: Mounted root (ext2 filesystem)
Freeing unused kernel memory: 184k freed
Unable to identify CD-ROM format.
pivot_root: No such file or directory
/linuxrc: line 41: cannot create temp file for here document: Read only file system
Kernel panic etc.


So, pivot_root is causing problems and that then messes up line 41 (exec chroot etc.) from the original linuxrc? I shall go back and figure out what pivot_root is all about, but does anyone have any ideas?

Edit: Two questions. One, does the pivot_root binary have to go in /bin or /sbin in the initrd? Mine's in /bin. Two, in my linuxrc file I have the line pivot_root . newroot - what's "newroot" all about? Cheers :)
_________________
O_o
Back to top
View user's profile Send private message
invalid account
Apprentice
Apprentice


Joined: 14 Jan 2004
Posts: 199

PostPosted: Fri Jan 28, 2005 8:27 pm    Post subject: Reply with quote

It doesn't matter where the pivot_root is really, as long as it is available on the path and the required libraries are in lib. So if your path is set to /bin then it should be in there. There isn't really any point in making an /sbin on initrd.

Neil
Back to top
View user's profile Send private message
Match
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 117
Location: England

PostPosted: Fri Jan 28, 2005 8:53 pm    Post subject: Reply with quote

Well, I assume it's in my path because other commands work - and it seems to work itself it just has problems with whatever's passed to it, I think.

Anyone have any ideas about what's causing this problem?
_________________
O_o
Back to top
View user's profile Send private message
invalid account
Apprentice
Apprentice


Joined: 14 Jan 2004
Posts: 199

PostPosted: Fri Jan 28, 2005 10:45 pm    Post subject: Reply with quote

What have you got at the end of you linuxrc script?

Also what is you grub kernel settings, is the initial root writable?
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1595
Location: Just over the horizon

PostPosted: Sat Jan 29, 2005 12:43 am    Post subject: Reply with quote

Match,
I've got pivot_root in the initrd /bin directory. In your linuxrc script, make sure you have a line like this at the very top:

export PATH=/bin

Also, make sure that your initrd bin contains an 'sh' executable and that the libraries to support everything in bin are in your 'lib' directory. The missing pivot_root is the key to your problems at this point, but getting that resolved should be a fairly straightforward matter.

Richard
Back to top
View user's profile Send private message
Match
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 117
Location: England

PostPosted: Sat Jan 29, 2005 9:37 am    Post subject: Reply with quote

End of linuxrc:

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


I've got the export PATH=/bin line, and I have all the libraries for all the executables (which all have +x set).

Here's the grub file:

Code:
default 0
timeout 5
splashimage=(cd)/boot/grub/splash.xpm.gz

title=Gentoo Linux
root (cd)
kernel (cd)/boot/kernel root=/dev/ram0 rw init=/linuxrc cdroot
initrd (cd)/boot/initrd


The bootup appears to pause on the line "Unable to identify CD-ROM format" - could this have anything to do with it?

Thanks for your help guys, I'm sunk without you :)
_________________
O_o
Back to top
View user's profile Send private message
Match
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 117
Location: England

PostPosted: Sat Jan 29, 2005 9:52 am    Post subject: Reply with quote

Just hang on one sec... I think it's the newroot that's the problem.

Right near the start of the installation veezi said to create a newroot directory "to be used in the inital boot process". I think I managed to skip that line due to knowing I could install stage 2 without this howto. I'll go try it out (and I'm guessing it should work now and I've just been really stupid...)

Edit: Yep, that was it. I now feel really bad for making you guys flex your brains for what was just a stupid mistake on my part. Thankyou. I probably wouldn't have thought of this without you giving me the alternatives.

Aaanyways, it's now booting but I've still got a load of error messages. Firstly, the same old "Unable to identify CD-ROM format." Secondly after init starts I get the messages:

Code:
fsck: fsck squashfs: not found
fsck: Error 2 while executing fsck.squashfs for /dev/loop0


I'm guessing a fsck is unnecessary as it's on a read-only medium so can I turn it off? And if I can, how would I go about doing that? :)

Code:
Calculating module dependencies...
Failed to calculate dependencies


I'm going to go back and read over the thread as I remember there being someone with a similar problem so I might be able to fix this myself. Edit: I did!

Code:
Bringing eth0 up via DHCP...
Error: Problem starting need services
"netmount" was not started


Now, I'm guessing this has something to do with my DHCP daemon, which it appears is installed but isn't running on boot (a file for it doesn't exist in /etc/init.d/). Not sure what to do here. Edit: Okay, somehow this now works. Not quite sure how, but last time I booted the internet was working...

On logging in I get this error:

Code:
PAM-env[7218]: Unknown PAM_ITEM: <DISPLAY>
login[7218]: PAM pam_putenv: delete non-existant entry: DISPLAY
PAM-env[7218]: Unknown PAM_ITEM: <XAUTHORITY>
login[7218]: PAM pam_putenv: delete non-existant entry: XAUTHORITY
login(pam_unix)[7218]: session opened for user root by (uid=0)


I'm going to try and solve this problem by following the instructions in this thread, unless anyone has a better idea. Edit: It appears to be working now without this error, but I'm not sure why I was getting in the first place - any ideas?

Finally, on shutdown I get this error as the final message before power off:

Code:
awk: cmd. line:2: fatal: cannot open file  /proc/mounts for reading (no such file or directory)


I'm not sure what awk is, so I'm going to have a look. Meanwhile, any help would be fantastic. Edit: Okay, I now know what awk is but it doesn't help :(
_________________
O_o


Last edited by Match on Sat Jan 29, 2005 1:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
Gruffi
Apprentice
Apprentice


Joined: 15 Aug 2003
Posts: 209
Location: Antwerpen - Flanders - Belgium

PostPosted: Sat Jan 29, 2005 12:54 pm    Post subject: Reply with quote

I installed sys-apps/hwdata-knoppix and sys-apps/kudzu-knoppix, also tried sys-apps/kudzu but when i launch autoconfig it complains about a missing /etc/init.d/kudzu :evil:

Anyone have this file for me :?:
_________________
... and we will show Microsoft, that they cannot take whatever they want. And that Free Software is our software!
Back to top
View user's profile Send private message
invalid account
Apprentice
Apprentice


Joined: 14 Jan 2004
Posts: 199

PostPosted: Sat Jan 29, 2005 4:22 pm    Post subject: Reply with quote

Match,

The error with fsck looks like you didn't have livecd in your USE settings when baselayout was emerged.

What looks like is happening is that the the root system is being checked like a normal HD install, but this is a feature that is disabled with the livecd setting.

To fix this just add "livecd" to the USE list and run emerge baselayout

I am not sure if your DHCP server is on the livecd or not. If not then you either need to make sure the DHCP server is running before you boot, or set a static IP address. If the livecd runs the DHCP server, then set the static net details for the livecd in /etc/conf.d/net.

If you need DHCP to run on boot, then execute

Code:

rc-update add <DHCP server name>


You need all this before creating the squashfs or tarballs for the cd.

Neil
Back to top
View user's profile Send private message
Match
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 117
Location: England

PostPosted: Sat Jan 29, 2005 4:45 pm    Post subject: Reply with quote

Hmm, it's odd because one of the first things I did was add livecd to my USE variable. I shall do as you say though - my memory is probably deficient.

Running rc-update add dhcpcd boot results in:

Code:
/sbin/rc-update: /etc/init.d/dhcpcd not found; aborting.


However, the internet appeared to work last time I tried to boot. I shall remake the iso and try again. Thanks for your help!
_________________
O_o
Back to top
View user's profile Send private message
Match
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 117
Location: England

PostPosted: Sat Jan 29, 2005 6:23 pm    Post subject: Reply with quote

I now don't have the file system check on startup, which is good. I've decided enough of the initial bugs are fixed and so am starting to configure X.

Now, I've tried using a default xorg.conf file and it just results in a blank screen. Could someone please explain to me exactly how I would go about getting an xorg.conf file created depending on the monitor? I've downloaded the mkxorgconf.sh script which some people say works and some people say doesn't, but have no idea how to get it working.

Edit: I've now tried running the script manually and have got twm up, but no mouse input. Not sure how to do it automatically though. Anyone know of a better way?

Thanks for all your help so far, everyone :)
_________________
O_o


Last edited by Match on Mon Jan 31, 2005 6:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
GentooBox
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1168
Location: Denmark

PostPosted: Sun Jan 30, 2005 11:33 am    Post subject: Reply with quote

I got a problem - I got the "no init found, try passing init= to kernel" - even if i pass init=/bin/sh to grub, then the error comes up.

so i wanted to see if /bin/sh worked like it should:

Code:

GentooBox / # cp /bin/sh /mnt/initrd/bin/
cp: overwrite `/mnt/initrd/bin/sh'? y
GentooBox / # chroot /mnt/initrd/
chroot: cannot run command `/bin/sh': No such file or directory


thats inside my 32bit livecd chroot (i run 64 bit)
as you can see, /bin/sh IS there, but it cant find it.

what can i do ?

EDIT: never mind - i found the initrd from a old livecd i made and used that instead. :)
_________________
Encrypt, lock up everything and duct tape the rest
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1595
Location: Just over the horizon

PostPosted: Sun Jan 30, 2005 7:12 pm    Post subject: Reply with quote

GentooBox,

Did you make sure you copied the libs required for /bin/sh to the lib directory as well?
Back to top
View user's profile Send private message
dma147
n00b
n00b


Joined: 20 Jun 2004
Posts: 35
Location: Berlin

PostPosted: Wed Feb 02, 2005 1:34 pm    Post subject: First: very much thanks to veezi for this great howto! Reply with quote

First: very much thanks to veezi for this great howto!

But I've a little problem:

I've read the howto several times to prevent any errors. But I still can't get it to work.

Code:

INIT: version 2.86 booting
INIT: no inittab file found

Enter runlevel:


Well, I can type in a runlevel then, for example "3".
But then this happens:

Code:

INIT: version 2.86 booting
INIT: no inittab file found

Enter runlevel: 3
INIT: Enterint runlevel: 3
INIT: no more processes left in this runlevel


And here it hangs. Nothing more happens.

Okay, I've then reemerged baselayout. Still the same result.
I've then emerged sysvinit. Still the same result.

Btw. there *is* a /etc/inittab. Should this be in the initrd/etc/?
Btw.2. I've also rc-update'ed all the services I need.

Any help would be really fine...

[edit]
Is it correct that the /etc/fstab and /etc/mtab in the initrd are empty?
[/edit]


[edit2]
I've copied the /etc/inittab to /mnt/initrd/etc/inittab, but this doesn't change anything...
[/edit2]
_________________
Alexander Mieland

LiSt - Linux Statistics
My system overview
Registered User #249600


Last edited by dma147 on Mon Feb 07, 2005 9:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
Bre_Rea
n00b
n00b


Joined: 30 Jan 2005
Posts: 20
Location: Texas USA

PostPosted: Thu Feb 03, 2005 9:27 pm    Post subject: Reply with quote

Gr8 Job :idea:
_________________
Insanity- Doing the same thing over and over expecting different results!
Back to top
View user's profile Send private message
invalid account
Apprentice
Apprentice


Joined: 14 Jan 2004
Posts: 199

PostPosted: Thu Feb 03, 2005 9:54 pm    Post subject: Reply with quote

Bre_Rea,

It may be that the squash fs isn't mounted properly.

Try passing

Code:

init=/bin/sh


to the kernel and then runing linuxrc by hand without sending the output to /dev/null.
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1595
Location: Just over the horizon

PostPosted: Sun Feb 06, 2005 3:46 pm    Post subject: Reply with quote

Ok, I've gotten this to do everything I want it to do, save one issue. Here's a quick overview. I've used this thread/Neil's script to create an emergency rescue disk build environment customized exactly to the machines I have, including all networking, security, etc. I basically want the ability to quickly restore either of my boxen should a disk drive on either crap out.

It works beautifully, even my laptop, but I've got some sensitve info on these boot disks (like my ssh keys) and I want to at least password protect the login on these rescue disks. Anybody got any idea how to go about that? I've been searching through all the startup scripts, but still haven't been able to figure out how to force the cdrom to prompt for a password when I boot it. And, yes, I did use the passwd command in the chroot environment to try to set it before I built the iso, and no joy.

Oh, and one other thing. Just a minor annoyance, but does anybody know how to avoid the '/proc/mounts' error message when rebooting. I know where it's happening, but I don't know how to turn it off without changing one of the baselayout scripts (halt.sh).
Back to top
View user's profile Send private message
invalid account
Apprentice
Apprentice


Joined: 14 Jan 2004
Posts: 199

PostPosted: Sun Feb 06, 2005 10:09 pm    Post subject: Reply with quote

platojones,

When I boot from the cd, I am prompted for my login details. I guess this isn't happening for you, and you are auto logged in as root like a normal livecd is?

If this is the case, then check your inittab to see if there is a line with

Code:

... -- autologin root ...


If there is then this is proably reing replaced by the /sbin/livecd-functions.sh script during boot, so you can alter this file, not to add the autologin entry.

I had this problem when working with catalyst.

Hope this is of some help.

Neil
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1595
Location: Just over the horizon

PostPosted: Mon Feb 07, 2005 1:21 am    Post subject: Reply with quote

Neil,
That was it, you nailed it again. Thanks for the help. You are the 'livecd' guy around these parts now :wink:
Back to top
View user's profile Send private message
neilhwatson
l33t
l33t


Joined: 06 Feb 2003
Posts: 719
Location: Canada

PostPosted: Wed Feb 09, 2005 2:34 pm    Post subject: /etc on USB Reply with quote

I've had success is building a liveCD to act as a router. I've been thinking of creating other liveCDs that could act as emergency DNS or email servers. For this to work I would need a non volatile storage medium for certain files systems. For DNS I would need /etc to be stored on a USB key. For email I would need /etc and /var to be stored on USB key.

How would I go about having the LiveCD mount /etc or /var on a USB key at boot time?
_________________
The true guru is a teacher.
Neil Watson
Back to top
View user's profile Send private message
danielha
n00b
n00b


Joined: 12 Dec 2003
Posts: 33

PostPosted: Fri Feb 11, 2005 8:56 pm    Post subject: Reply with quote

It just took me three days :) But I now have a working base to create a full livecd !

Many thanks to veezi for this tutorial and to Neil (Invalid Account) for his script which is a lifesaver for a newbee like me :)

Daniel
Back to top
View user's profile Send private message
invalid account
Apprentice
Apprentice


Joined: 14 Jan 2004
Posts: 199

PostPosted: Sat Feb 12, 2005 7:02 pm    Post subject: Reply with quote

Thank you guys for the positive feedback.

neilhwatson,

You could just mount the USB drive in fstab.

Another thing that I do is in linuxrc I look for an overlay.tar.gz file on the floppy drive (you can do the same thing with the USB/scsi drive) this overlay is unpacked in the new root file system, and in the overlay.tar.gz I have an updated fstab and/or an updated /etc/conf.d/local.start file that mounts any partitions that I need.

If I then only want to use part of the newly mounted partitions I just use

Code:

mount -o bind mounted_dir new_filesystem_dir


in the updated local.start file

This is how I manage my server running from a livecd with my persisted email, web site and subversion service.

This way I can use a vanilla server livecd in a range of hardware, the aim being that if one machine dies I can put the cd in another box and only have to change a config file on a floppy and it is back in action.

Neil
Back to top
View user's profile Send private message
pi-cubic
Tux's lil' helper
Tux's lil' helper


Joined: 25 May 2003
Posts: 143

PostPosted: Thu Feb 17, 2005 6:19 pm    Post subject: Reply with quote

dcoyaz wrote:

Code:
qemu -cdrom livecd.iso -boot d

This will allow you to test before burning, and maybe even throwing some qemu options to alter the running hardware. :D

HTH,


when i start qemu as above, nothing happens. are there any additional parameter nessecary?

greetings,

pi
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 ... 7, 8, 9 ... 19, 20, 21  Next
Page 8 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