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 ... 18, 19, 20, 21  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
scriptX
n00b
n00b


Joined: 05 Jul 2005
Posts: 69

PostPosted: Tue Jan 24, 2006 4:23 am    Post subject: Reply with quote

I actually didn't have it compiled in... I did compile it just last night, haven't had a chance to try again. Hopefully it'll work now...
Back to top
View user's profile Send private message
scriptX
n00b
n00b


Joined: 05 Jul 2005
Posts: 69

PostPosted: Wed Jan 25, 2006 3:34 am    Post subject: Reply with quote

The problem was that I didn't have it compiled in, now I do and have finished the tutorial. A new problem arises:

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


This is under

Code:
qemu -cdrom livecd.iso


if it makes an difference.

[EDIT]
Meh, I didn't have initrd support compiled in... I'll retry...... brb

[EDIT]
Well, I got farther. /linuxrc is failing at line 41
Code:

/linxurc:41:
exec chroot . /bin/sh <<- EOF >dev/console 2>&1

QEMU:
pivot_root: No such file or directory
/linuxrc: line 41: cannot create temp file for here document: Read-only file system
Kernel panic - not syncing: Attempted to kill init!


Methinks it's pivot_root not being found... I just fixed it (I think), we'll see if that helps.

[EDIT]
Now I get:
Code:
/linuxrc: line 40: pivot_root: command not found
/linuxrc: line 41: cannot create temp file for here document: Read-only file system
Kernel panic - not syncing: Attempted to kill init!


In the previous post, I moved pivot_root to /sbin (it was in /bin). I'll try.... using absolute paths -.-
Back to top
View user's profile Send private message
hanni_ali
n00b
n00b


Joined: 16 Jun 2005
Posts: 57
Location: UK, London

PostPosted: Wed Jan 25, 2006 9:23 am    Post subject: Reply with quote

If your still getting it check you have all the options in the kernel reccommended it sounds like something's missing or maybe an issue with your menu.lst in grub.
Back to top
View user's profile Send private message
Lepaca Kliffoth
l33t
l33t


Joined: 28 Apr 2004
Posts: 737
Location: Florence, Italy

PostPosted: Wed Jan 25, 2006 9:27 am    Post subject: Reply with quote

As sh says, you're missing the pivot_root executable. Either you forgot to copy it under /bin or it's in a directory that isn't included in the PATH env variable.

Try mounting the initrd, chrooting into it (chroot /mnt/initrd /bin/sh) and then calling /bin/pivot_root. If it exists and works, check the PATH variable set inside the linuxrc script.
_________________
It isn't enough to win - everyone else must lose, and you also have to rub it in their face (maybe chop off an arm too for good measure).
Animebox!
Back to top
View user's profile Send private message
scriptX
n00b
n00b


Joined: 05 Jul 2005
Posts: 69

PostPosted: Thu Jan 26, 2006 5:01 am    Post subject: Reply with quote

I used
Code:
genkernel initrd

and all is fine.

http://gentoo-wiki.com/HOWTO_build_a_LiveCD_from_scratch#INITRD_image
Back to top
View user's profile Send private message
scriptX
n00b
n00b


Joined: 05 Jul 2005
Posts: 69

PostPosted: Mon Jan 30, 2006 3:44 am    Post subject: Reply with quote

Code:
gentoo ~ # cd livecd
gentoo livecd # ./enter.sh
gentoo / # ifconfig
bash: ifconfig: command not found
gentoo / #


What's the deal?
Back to top
View user's profile Send private message
Lepaca Kliffoth
l33t
l33t


Joined: 28 Apr 2004
Posts: 737
Location: Florence, Italy

PostPosted: Mon Jan 30, 2006 8:27 am    Post subject: Reply with quote

I don't know what that enter.sh is but have you recreated the environment variables running "env-update && source /etc/profile"? Try running it. Have you tried running /sbin/ifconfig instead of just ifconfig?
_________________
It isn't enough to win - everyone else must lose, and you also have to rub it in their face (maybe chop off an arm too for good measure).
Animebox!
Back to top
View user's profile Send private message
scriptX
n00b
n00b


Joined: 05 Jul 2005
Posts: 69

PostPosted: Mon Jan 30, 2006 11:23 pm    Post subject: Reply with quote

Code:
gentoo / # ls /sbin | grep ifconfig
gentoo / # /sbin/ifconfig
bash: /sbin/ifconfig: No such file or directory
gentoo / # env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...
gentoo / # /sbin/ifconfig
bash: /sbin/ifconfig: No such file or directory
gentoo / # ifconfig
bash: ifconfig: command not found
gentoo / #


enter.sh:
Code:
#!/bin/bash

mount -o bind /proc source/proc
mount -o bind /sys source/sys
mount -o bind /dev source/dev
mount -o bind /dev/pts source/dev/pts
mount -o bind /usr/portage/distfiles source/usr/portage/distfiles

chroot source/ /bin/bash --login

umount source/proc
umount source/sys
umount source/dev/pts
umount source/dev
umount source/usr/portage/distfiles



[EDIT]
I guess I could just copy it over...
Back to top
View user's profile Send private message
Lepaca Kliffoth
l33t
l33t


Joined: 28 Apr 2004
Posts: 737
Location: Florence, Italy

PostPosted: Tue Jan 31, 2006 8:37 am    Post subject: Reply with quote

As the first command you ran shows, there is no ifconfig under /sbin. I don't know what the hell you're doing but ifconfig is in the base system in Gentoo so something has gone VERY wrong...
_________________
It isn't enough to win - everyone else must lose, and you also have to rub it in their face (maybe chop off an arm too for good measure).
Animebox!
Back to top
View user's profile Send private message
hanni_ali
n00b
n00b


Joined: 16 Jun 2005
Posts: 57
Location: UK, London

PostPosted: Thu Feb 02, 2006 8:52 pm    Post subject: Reply with quote

I have a question I've been using this sort of thing for creating livecd's for about a year now but I cannot get automounting to work once the livecd boots into kde

any suggestions
Back to top
View user's profile Send private message
Lepaca Kliffoth
l33t
l33t


Joined: 28 Apr 2004
Posts: 737
Location: Florence, Italy

PostPosted: Fri Feb 03, 2006 12:45 am    Post subject: Reply with quote

You'll find several threads about automounting with KDE. You need hal (dbus too of course) and pmount. It works flawlessly for me.
_________________
It isn't enough to win - everyone else must lose, and you also have to rub it in their face (maybe chop off an arm too for good measure).
Animebox!
Back to top
View user's profile Send private message
hanni_ali
n00b
n00b


Joined: 16 Jun 2005
Posts: 57
Location: UK, London

PostPosted: Fri Feb 03, 2006 2:51 pm    Post subject: Reply with quote

On a LiveCD?

I want kdemedia manager to mount ANY removable device plugged into the system but mainly just usbflash drives

they are detected they can be mounted manually but not automatically

I have all those

dbus, hal, kde 3.4.3, pmount...

I'd also tried using ivman but I've removed that now

And hours and hours of effort how come it won't work

I've tried udev rules as well

plus automounting as root using kdemedia manager is ita ny different?
Back to top
View user's profile Send private message
Lepaca Kliffoth
l33t
l33t


Joined: 28 Apr 2004
Posts: 737
Location: Florence, Italy

PostPosted: Fri Feb 03, 2006 7:02 pm    Post subject: Reply with quote

Sorry but you don't make any sense and this is not the place to ask anyway. Please refer to a thread about automounting under KDE and ask there. Only thing I can tell you is that I configured KDE as I would have configured it on a nromal installation and it works from the LiveCD as it doeas from the hard disk. If you have any problem regarding the making of a livecd or the guide itself I'll help you as much as I can.
_________________
It isn't enough to win - everyone else must lose, and you also have to rub it in their face (maybe chop off an arm too for good measure).
Animebox!
Back to top
View user's profile Send private message
fidel
Guru
Guru


Joined: 16 Jul 2004
Posts: 407
Location: CH

PostPosted: Sun Feb 12, 2006 2:12 pm    Post subject: Reply with quote

I just don't get the right device for the cd rom probed. When I boot the livecd I created it somehow always tries to determine a cdrom on my harddrive /dev/hda*. I got 9 partitions, mostly reiserfs. In the boot process it assumes to find a cdrom device on /dev/hda9. I even kicked hda and hdb from my linuxrc script, still, the same! I still probes my harddrive... I disabled the harddrive in the bios, still, it determines my cdrom on /dev/hda9...
I spent hours and hours and hours trying to get a working livecd (need it for installing on a raid with a promise TX2300, I seem to need kernel-2.6.15 or newer...)
I found your smooth guide hours and hours after already trying to suceed with another guide:

http://gentoo-wiki.com/HOWTO_build_a_LiveCD_from_scratch

On that guide, the script linuxrc is missing totally! It is mentioned in the boot kernel command, but..
Therefore I needed one, found one here and tried to adapt the needed things. My linuxrc ended up like this:
Code:

#!/bin/sh
export PATH=/bin


mount -t proc none /proc
CMDLINE=`cat /proc/cmdline`
umount /proc


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


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


mount -t squashfs -o loop /cdrom/livecd.squashfs /new > /dev/null 2>&1
mount -t tmpfs -o size=8m none /new/var > /dev/null 2>&1
mount -t tmpfs -o size=4m none /new/etc > /dev/null 2>&1
mount -t tmpfs -o size=32m none /new/tmp > /dev/null 2>&1
mount -t tmpfs -o size=32m none /new/root > /dev/null 2>&1
cd /new/var && tar xpf /cdrom/files/var.tar > /dev/null 2>&1
cd /new/etc && tar xpf /cdrom/files/etc.tar > /dev/null 2>&1
cd /new/root && tar xpf /cdrom/files/root.tar > /dev/null 2>&1

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


Whatever I try, no luck! :cry: :cry: :cry:
What could I do to get that livecd to work?.. I am totally stuck..
Thanks for any help!!!!
Greets
fidel
Back to top
View user's profile Send private message
Lepaca Kliffoth
l33t
l33t


Joined: 28 Apr 2004
Posts: 737
Location: Florence, Italy

PostPosted: Sun Feb 12, 2006 2:33 pm    Post subject: Reply with quote

(I think veezi's not around anymore)

After you replaced genkernel's initrd with the one you posted where does it fail? What's the error message? The linuxrc from this guide won't try to mount hda9 so it must be something else. You can try my own guide too if you want but you'll have to modify many things.
_________________
It isn't enough to win - everyone else must lose, and you also have to rub it in their face (maybe chop off an arm too for good measure).
Animebox!
Back to top
View user's profile Send private message
fidel
Guru
Guru


Joined: 16 Jul 2004
Posts: 407
Location: CH

PostPosted: Sun Feb 12, 2006 3:34 pm    Post subject: Reply with quote

The cd boots and finds the kernel, that's all fine. Afterwards the linuxrc starts and tries to find the appropriate cdrom. There it fails! It just goes for any hd* devices and tries to mount them. It finally finds the /dev/hda9 and starts mounting it.. There the error appears, as it can't find "livecd.squashfs" and exits, I get the error I should append a correct "loop=" line.
The point is, I don't understand why my hda gets probed, I removed that one from the linuxrc. I wouldn't care if I only got the option of being able to mount /dev/hdc, since mostly I connect the cdroms and dvds on the master of the second IDE...
Since I followed the other guide, where there cannot be found any linuxrc at all, I am not sure anymore, if its my linuxrc that gets executed at all... I could imagine that the genkernel initrd tries to probe the cdrom device.. Just don't know anything anymore... :cry:
Maybe someone knows how to achieve using my livecd. Otherwise I most probably will start all over and try your guide!.. Just a bit tired of "trying" ;-)
But thanks anyway!
greets!
fidel
Back to top
View user's profile Send private message
Lepaca Kliffoth
l33t
l33t


Joined: 28 Apr 2004
Posts: 737
Location: Florence, Italy

PostPosted: Sun Feb 12, 2006 4:17 pm    Post subject: Reply with quote

Is what you're using an initrd or an initramfs? I suggest you go the initrd way. You could try rebuilding the initrd from scratch, it takes only a little time. Refer to the relevant part of this guide or section number 5 of my guide if you wish to try that. Once you have an initrd just modify the bootloader's configuratin so that it loads it.
I'm saying this because although what you write is confused it seems to me that your problem is that your linuxrc isn't being executed at all. There is no other explanation since it keeps doing things it cannot do.
_________________
It isn't enough to win - everyone else must lose, and you also have to rub it in their face (maybe chop off an arm too for good measure).
Animebox!
Back to top
View user's profile Send private message
fidel
Guru
Guru


Joined: 16 Jul 2004
Posts: 407
Location: CH

PostPosted: Sun Feb 12, 2006 8:41 pm    Post subject: Reply with quote

It really was an initramfs and NOT an initrd!.. Noob me didn't know that not only the name of the file differs! :oops:
I'm no building the cd again, trying to succeed with an initrd, I was a bit scared of the complexity of building an initrd, therefore I liked to use genkernel just needing to type genkernel initrd.. Stupid thing it still creates an initramfs!... I still don't know the difference of it though, will keep on reading!
Thanks once again! I'll see if it works, otherwise I really start all over again...
By the way, do I need livecd-tools installed? According to
http://de.gentoo-wiki.com/Eigene_LiveCD_bauen_ohne_catalyst
grub only understands the cdroot parameter having livecd-tools installed...
greets!
fidel

[edit]
Now my cd boots, loads the kernel and leaves me at a sh-prompt.. ok, I will start all over and use your guide!
[/edit]
Back to top
View user's profile Send private message
Lepaca Kliffoth
l33t
l33t


Joined: 28 Apr 2004
Posts: 737
Location: Florence, Italy

PostPosted: Sun Feb 12, 2006 9:02 pm    Post subject: Reply with quote

I think livecd-tools are needed only for genkernel's initramfs. I'm not sure though. When I still used grub I had no problems without that package, it booted the CD just fine (now I use isolinux).
_________________
It isn't enough to win - everyone else must lose, and you also have to rub it in their face (maybe chop off an arm too for good measure).
Animebox!
Back to top
View user's profile Send private message
sixtymhz
n00b
n00b


Joined: 16 May 2005
Posts: 7

PostPosted: Tue Feb 14, 2006 5:32 pm    Post subject: Reply with quote

What is the roots passwd on the livecd?? Or how can I set it so I can use emeger and such?

Thanks.
Back to top
View user's profile Send private message
fidel
Guru
Guru


Joined: 16 Jul 2004
Posts: 407
Location: CH

PostPosted: Tue Feb 14, 2006 5:49 pm    Post subject: Reply with quote

The root password on the livecd is not set, you can set a password using
Code:
# passwd

Strange that this question appears at all, since when you boot from the livecd you are automatically logged in as root!...
If you boot your own livecd though, the root password is most probably the same as in your installation you use for the livecd...
greets
fidel
Back to top
View user's profile Send private message
Lepaca Kliffoth
l33t
l33t


Joined: 28 Apr 2004
Posts: 737
Location: Florence, Italy

PostPosted: Wed Feb 15, 2006 2:23 am    Post subject: Reply with quote

fidel wrote:
If you boot your own livecd though, the root password is most probably the same as in your installation you use for the livecd...


No, unless you copy things from the host system /etc to the /etc of the livecd. Normally the root password is unset and you can't login no matter what so the "good way" is to set the passwords with "passwd root", "passwd user1", "passwd user2" and so on from inside the chroot.
_________________
It isn't enough to win - everyone else must lose, and you also have to rub it in their face (maybe chop off an arm too for good measure).
Animebox!
Back to top
View user's profile Send private message
fidel
Guru
Guru


Joined: 16 Jul 2004
Posts: 407
Location: CH

PostPosted: Wed Feb 15, 2006 12:08 pm    Post subject: Reply with quote

Sorry!
... and sorry for asking again! I am getting closer, just another stupid newbie question: where do I have to put the linuxrc script? Does this go into livecd/source/linuxrc or livecd/source/boot/linuxrc or livecd/source/mnt/initrd/linuxrc...??
Back to top
View user's profile Send private message
Lepaca Kliffoth
l33t
l33t


Joined: 28 Apr 2004
Posts: 737
Location: Florence, Italy

PostPosted: Wed Feb 15, 2006 12:39 pm    Post subject: Reply with quote

Sorry for what??

Anyway, short: linuxrc goes inside the initrd.

Long: linuxrc is a script called by the kernel; instead of calling /sbin/init it calls linuxrc, which is a behaviour you trigger with the "init=/linuxrc" parameter you put in the kernel commandline, specified inside the bootloader's configuration, "kernel (cd)/boot/vmlinuz init=/linuxrc root=/dev/ram0" for grub. Since the kernel doesn't mount the root fs straight away you can't just keep linuxrc somewhere inside the root fs. The kernel mounts the initrd -- "initrd (cd)/boot/initrd" in grub's configuration -- and then tries to execute linuxrc. That's why the linuxrc script must be inside the initrd. Don't put it under /bin; it must be directly under / unless you change "init=/linuxrc" to something else. You have to mount the initrd with "mount -o loop initrd /somewhere" and then "mv linuxrc /somewhere/". Make sure linuxrc has the exec flag enabled: "chmod +x /somewhere/linuxrc". That's all.
_________________
It isn't enough to win - everyone else must lose, and you also have to rub it in their face (maybe chop off an arm too for good measure).
Animebox!
Back to top
View user's profile Send private message
fidel
Guru
Guru


Joined: 16 Jul 2004
Posts: 407
Location: CH

PostPosted: Wed Feb 15, 2006 1:06 pm    Post subject: Reply with quote

Thanks!
I get a kernel panic, linuxrc not found. I already copied (in the chroot) the linuxrc file (executable!) to /boot/linuxrc /linuxrc and have the same content in /mnt/initrd/linuxrc
My /boot/grub/menu.lst:
Code:

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

title=Gentoo Linux - 2.6.15-r1
root (cd)
kernel (cd)/boot/kernel-2.6.15-r1 vga=0x317 video=vesafb,mtrr,ywrap root=/dev/ram0 rw init=/linuxrc cdroot dodmraid
initrd (cd)/boot/initrd

title=Memtest86+
root (cd)
kernel (cd)/boot/memtest86plus/memtest.bin

My corresponding folders:
Code:
# ls -lh /boot
insgesamt 12M
lrwxrwxrwx  1 root root    1 14. Feb 20:59 boot -> .
-rw-r--r--  1 root root  37K 15. Feb 09:30 config-2.6.15-r1
drwxr-xr-x  2 root root  544 15. Feb 09:55 grub
-rw-r--r--  1 root root 8.0M 15. Feb 14:00 initrd
-rw-r--r--  1 root root 2.5M 15. Feb 09:29 kernel-2.6.15-r1
-rwxr-xr-x  1 root root 1.1K 15. Feb 13:11 linuxrc
drwxr-xr-x  2 root root   80 15. Feb 09:56 memtest86plus
-rw-r--r--  1 root root 857K 15. Feb 09:29 System.map-2.6.15-r1
# ls -lh /mnt/initrd
insgesamt 21K
drwxr-xr-x  2 root root 1.0K 15. Feb 14:00 bin
drwxr-xr-x  2 root root 1.0K 15. Feb 14:00 cdrom
drwxr-xr-x  2 root root 1.0K 15. Feb 14:00 dev
drwxr-xr-x  2 root root 1.0K 15. Feb 14:00 etc
drwxr-xr-x  2 root root 1.0K 15. Feb 14:00 lib
-rwxr-xr-x  1 root root 1.1K 15. Feb 14:00 linuxrc
drwx------  2 root root  12K 15. Feb 14:00 lost+found
drwxr-xr-x  2 root root 1.0K 15. Feb 14:00 new
drwxr-xr-x  2 root root 1.0K 15. Feb 14:00 proc
# ls -lh /
insgesamt 22K
drwxr-xr-x    2 root root 3.7K 15. Feb 09:52 bin
drwxr-xr-x    4 root root  304 15. Feb 13:12 boot
drwxr-xr-x   19 root root  14K 15. Feb 13:47 dev
drwxr-xr-x   36 root root 2.6K 15. Feb 14:00 etc
drwxr-xr-x    2 root root   72 19. Okt 18:12 home
drwxr-xr-x    8 root root 3.9K 15. Feb 12:23 lib
-rwxr-xr-x    1 root root 1.1K 15. Feb 12:35 linuxrc
-rwxr-xr-x    1 root root 1.1K 15. Feb 13:24 mkinitrd
drwxr-xr-x    5 root root  144 15. Feb 12:04 mnt
drwxr-xr-x    2 root root   72 19. Okt 18:12 opt
dr-xr-xr-x  112 root root    0 15. Feb 2006  proc
drwx------    2 root root  128 15. Feb 10:53 root
drwxr-xr-x    2 root root 4.0K 15. Feb 13:11 sbin
drwxr-xr-x    2 root root   72 19. Okt 18:12 sys
drwxrwxrwt    2 root root   72 15. Feb 13:10 tmp
drwxr-xr-x   12 root root  352 14. Feb 22:10 usr
drwxr-xr-x   10 root root  336 15. Feb 12:24 var

I don't get why my linuxrc cannot be found... :(
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 ... 18, 19, 20, 21  Next
Page 19 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