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


Joined: 17 Oct 2004
Posts: 47

PostPosted: Thu Apr 21, 2005 9:35 pm    Post subject: autodetection? Reply with quote

Hi guys,

I would like to know how did you solve the autodetection. I have been looking the gentoo livecd linuxrc and init scripts
and apparently in linuxrc they do some basic autodetection for critical hardware and after that they launch an initscript
call autoconfig which is the one that do the magic.
Do you know what package I have to emerge in order to have that initscript?

Have you add autodetection features to your personal livecds? What did you do?

The other solution is to compile more device drivers in the kernel instead of compiling them as a modules but that

is a very dirty approach.

Thanks,
Back to top
View user's profile Send private message
tkole
n00b
n00b


Joined: 26 Sep 2003
Posts: 21

PostPosted: Fri Apr 22, 2005 5:44 pm    Post subject: nessus on livecd Reply with quote

I'm trying to put nessus on my livecd but i've encountered a number of problems:

1. By default 'nessus-mkcert' is needed to create SSL certs and set up
nessusd.conf and nessusd.rules. 'nessus-mkcert' writes the CA certs to
/usr/com/nessus... which is part of the livecd's READ-ONLY filesystem.
I can fix this either by editing the 'nessus-mkcert' to write to a
writable filesystem such as /etc, or I could use a livecd/root_overlay
and have standard CA certs and conf files copied over to /etc/nessus
when making livecd-stage2. How exactly did you get around this
problem?

2. When starting nessus with '/etc/init.d/nessus start' a whole list
of errors flood the screen as it trys to load the plugins. I'm
guessing this is because its trying to write to a read-only filesystem
again. Has anyone managed to make a work around for this?


Any fsscript or overlay or extra config files are welcome!
Back to top
View user's profile Send private message
gctaylor
n00b
n00b


Joined: 20 Nov 2004
Posts: 40

PostPosted: Sat Apr 23, 2005 4:16 am    Post subject: Kernel panic - not syncing: No init found. Try passing init Reply with quote

Hi,

I've been unable to get this LiveCD to boot after working on it for a couple of weeks now. Here's as far as I get:

Code:

RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 8192KiB [1 disk] into ram disk... done.
EXT2-fs warming mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 204k freed
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.



I've read a couple of comments in this thread about others having similar problems but it wasn't clear to me how it was resolved.

What's the next thing that it should be trying?

Some relevant file attributes that I hope are useful:

Code:

# ls -l /boot/initrd
 -rw-r--r--  1 root root 8388608 Apr 19 20:14 /boot/initrd

 speedy12 grub # ls -l
 -rw-r--r--  1 root root    200 Apr 19 20:13 grub.conf
 -rw-r--r--  1 root root    200 Apr 20 19:07 menu.lst

 # mount -o loop /boot/initrd /mnt/initrd

 # cd /mnt/initrd/
 initrd # ls -l
total 21
drwxr-xr-x  2 root root  1024 Apr 20 17:54 bin
drwxr-xr-x  2 root root  1024 Apr 19 20:14 cdrom
drwxr-xr-x  2 root root  1024 Apr 20 17:54 dev
drwxr-xr-x  2 root root  1024 Apr 19 20:15 etc
drwxr-xr-x  2 root root  1024 Apr 20 17:54 lib
-rwxr-xr-x  1 root root  1105 Apr 22 16:51 linuxrc
drwx------  2 root root 12288 Apr 19 20:14 lost+found
drwxr-xr-x  2 root root  1024 Apr 19 20:14 new
drwxr-xr-x  2 root root  1024 Apr 19 20:14 proc
Back to top
View user's profile Send private message
Wolven
Guru
Guru


Joined: 05 Aug 2003
Posts: 325
Location: Norway

PostPosted: Sat Apr 23, 2005 10:03 am    Post subject: Re: Kernel panic - not syncing: No init found. Try passing Reply with quote

gctaylor wrote:
Hi,

I've been unable to get this LiveCD to boot after working on it for a couple of weeks now. Here's as far as I get:

Code:

RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 8192KiB [1 disk] into ram disk... done.
EXT2-fs warming mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 204k freed
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.


I think you are missing some files in the /mnt/initrd/lib dir.
Be very careful to include all the files that
Code:
ldd /bin/XYZ

gives you.
I found this step very confusing, but you need to do this for ALL of the files you copy from /etc/bin. And not just for /bin/mount as the example shows.

HTH
Back to top
View user's profile Send private message
ang
n00b
n00b


Joined: 30 Jan 2003
Posts: 29

PostPosted: Sat Apr 23, 2005 10:26 am    Post subject: Re: Kernel panic - not syncing: No init found. Try passing Reply with quote

gctaylor wrote:


Code:


Kernel panic - not syncing: No init found.  Try passing init= option to kernel.



You need /lib/ld-linux*in /mnt/initrd/lib

try to chroot into the initrd of your livecd to check you got all libs
Back to top
View user's profile Send private message
gctaylor
n00b
n00b


Joined: 20 Nov 2004
Posts: 40

PostPosted: Sat Apr 23, 2005 5:20 pm    Post subject: Kernel panic - not syncing: No init found [SOLVED] Reply with quote

I was missing a file in /mnt/initrd/lib. @#$%!

Thank-you ang and Wolven for pointing this out!

Once I got past that I was getting an error about not finding /dev/hdX devices. I took off the option in the kernel .config to automatically mount dev file system at boot and that fixed it. I saw someone in an earlier post suggested enabling that option. Hopefully this tidbit will help someone else in the future.
Back to top
View user's profile Send private message
Kampi
n00b
n00b


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

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

drio wrote:


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]


as dirty as yours, but without 'echo' and the 'M' at the end. (maybe the 'M' is not needed...)
Code:

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


Joined: 09 Dec 2004
Posts: 6

PostPosted: Tue May 03, 2005 7:24 pm    Post subject: Reply with quote

Hey guys, i've been building a livecd for a while now, but i got a question, how can you make it eject after your reboot? I'm trying to make a automated install live-cd for my computers, but i can't get it to autoeject during reboot.

I've tried doing it manually,
umount -l /newroot/cdrom
eject /dev/cdrom
but then it doesn't shutdown cleanly

Then i mirrored all the /bin and /sbin directories onto tmpfs' so i can unmount it all, but that also fails. There's gotta be a easier way.
Thanks!

Any hints/tips/tricks?
Back to top
View user's profile Send private message
Farkenell
Tux's lil' helper
Tux's lil' helper


Joined: 05 Dec 2003
Posts: 88

PostPosted: Wed May 04, 2005 7:24 am    Post subject: Reply with quote

Has anyone here successfuly got mysql running on the livedisc?

I'm not sure how to go about setting up a initial user when I can't connect to the myqsl server in a chrooted environment.....although the disc has rw properties on the /var directory, it complains about unable to connect on /var/run/mysqld/something.socket

Hrmm I was thinking maybe copying an existing database but am not sure what files I'll need to copy over.....I'll try some more stuff when I get back home.....
Back to top
View user's profile Send private message
deckernico
n00b
n00b


Joined: 09 Dec 2004
Posts: 6

PostPosted: Thu May 05, 2005 2:15 pm    Post subject: Reply with quote

Farkenell wrote:
Has anyone here successfuly got mysql running on the livedisc?

I'm not sure how to go about setting up a initial user when I can't connect to the myqsl server in a chrooted environment.....although the disc has rw properties on the /var directory, it complains about unable to connect on /var/run/mysqld/something.socket

Hrmm I was thinking maybe copying an existing database but am not sure what files I'll need to copy over.....I'll try some more stuff when I get back home.....


You sure the mysql daemon is running? It sounds like the client can't connect to the backend.

Try running mysqld not as a daemon to see if it can bind to the socket, and don't forget to check the logs in /var/log/ to make sure there's no errors.
Back to top
View user's profile Send private message
Farkenell
Tux's lil' helper
Tux's lil' helper


Joined: 05 Dec 2003
Posts: 88

PostPosted: Fri May 06, 2005 1:55 am    Post subject: Reply with quote

Yeah I'm having trouble getting it started, in the chrooted environment and when the livedisc boots....

atm I'm trying to get some other issues going with my current build.....:/ (stupid thing won't prompt login, I think its cause I was missing the livecd flag halfway through, was hoping I'd get away with it)....I'll try to get a more specific problems with the mysqld problem....
Back to top
View user's profile Send private message
cdelc040
n00b
n00b


Joined: 07 Feb 2005
Posts: 11

PostPosted: Fri May 06, 2005 4:56 pm    Post subject: Reply with quote

I'm having trouble getting the image booted. When I use...
Code:
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=/bin/sh cdroot
       initrd (cd)/boot/initrd

...for grub/menu.lst I get...
Code:
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 8192KiB [1 disk] into ram disk... done.
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 212k freed
cdroot:cdroot: No such file or directory
Kernel panic = not syncing: Attempted to kill init!

And when I use...
Code:
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
       initrd (cd)/boot/initrd

...I get...
Code:
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 892KiB [1 disk] into ram disk... done.
VFS: Mounted root (ext2 filesystem).
Freeing unused kermel memory: 212k freed
INIT: version 2.84 booting

Enter runlevel:

When I enter a number (example 5) it then says...
Code:
INIT: Entering runlevel: 5
INIT: no more processes left in this runlevel


I think I saw a very similar problem posted before, but I didn't find an answer. I would greatly appreciate any suggestions on how to fix this.
_________________
Chris Delcamp
Network Engineer & Gentoo Systems Admin


Last edited by cdelc040 on Thu May 26, 2005 3:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
bladdo
Guru
Guru


Joined: 19 Jul 2004
Posts: 334
Location: NJ

PostPosted: Fri May 06, 2005 11:32 pm    Post subject: Reply with quote

Very nice howto 8)
_________________
Bladdo formerly >Milo<
bladdo.net - scripting and design
Creator of AIM Bot: Tiny Tiny Bot - the bot that learns
distro: gentoo | window manager: pekwm
Back to top
View user's profile Send private message
RuFI0
n00b
n00b


Joined: 16 Sep 2004
Posts: 30
Location: Malaysia

PostPosted: Sun May 08, 2005 2:18 pm    Post subject: Reply with quote

Does anybody know how i can make the /home/username directory writeable? I think it's what's causing my KDE from starting. I keep getting errors about "dcopserver not started" and "kde conf not writeable" and at the end when the KDE splash screens comes up, it says that KDE can't start cause it can't write to my home directory. Any ideas how i can get pass this? Thanks in advance

cdelc040: Are u using 2004.3 or 2005.0? I had the same problems using 2005.0 and wasted weeks trying to solve it. Then i changed to 2004.3 and it booted perfectly.
Back to top
View user's profile Send private message
cdelc040
n00b
n00b


Joined: 07 Feb 2005
Posts: 11

PostPosted: Mon May 09, 2005 12:20 pm    Post subject: Reply with quote

I'm using 2005.0. I didn't think it would make a difference. Do I need to use 2004.3 as my portage profile as well, or should I be able to upgrade that to 2005.0?
_________________
Chris Delcamp
Network Engineer & Gentoo Systems Admin
Back to top
View user's profile Send private message
RuFI0
n00b
n00b


Joined: 16 Sep 2004
Posts: 30
Location: Malaysia

PostPosted: Mon May 09, 2005 4:38 pm    Post subject: Reply with quote

i used 2004.3 for the base but i used the 2005 profile and it worked just fine with no problems
Back to top
View user's profile Send private message
MixMax
n00b
n00b


Joined: 28 Jan 2005
Posts: 73
Location: Finland

PostPosted: Tue May 10, 2005 8:11 am    Post subject: Reply with quote

You could use unionfs to make your every directory writable. There is nice instuctions how to do that few pages back.
Back to top
View user's profile Send private message
RuFI0
n00b
n00b


Joined: 16 Sep 2004
Posts: 30
Location: Malaysia

PostPosted: Tue May 10, 2005 6:03 pm    Post subject: Reply with quote

Hey MixMax, thanks for the reply but i can't seem to find the page with the unionfs instructions.
Back to top
View user's profile Send private message
MixMax
n00b
n00b


Joined: 28 Jan 2005
Posts: 73
Location: Finland

PostPosted: Fri May 13, 2005 7:55 am    Post subject: Reply with quote

You can find it here at the top of the page posted by Illissius.

It's very handy feature to have on a livecd ;)
Back to top
View user's profile Send private message
nd_stew
n00b
n00b


Joined: 13 May 2005
Posts: 3

PostPosted: Fri May 13, 2005 1:30 pm    Post subject: So Close, but Squashed! Reply with quote

Hey I've been working this awhile... I get to the linuxrc during the boot, can /bin/sh into
it, initrd looks good, bins, and libs, but looks like I'm missing my squashfs file system type
on the mount?

mount: /dev/loop0 has wrong device number or fs type squashfs not supported

./initrd/dev:
total 0
crw-r--r-- 1 root root 5, 1 May 10 06:16 console
brw-r--r-- 1 root root 3, 0 May 10 06:16 hda
brw-r--r-- 1 root root 3, 64 May 10 06:16 hdb
brw-r--r-- 1 root root 22, 0 May 10 06:16 hdc
brw-r--r-- 1 root root 22, 64 May 10 06:16 hdd
brw-r--r-- 1 root root 7, 0 May 10 06:16 loop0
crw-r--r-- 1 root root 1, 3 May 10 06:16 null
crw-r--r-- 1 root root 4, 0 May 10 06:16 tty

The only variance to the HowTo I see is that I'm doing a stage3 with 2005.0.

loop0 looked good to me so I figured squash must not be in the kernel correctly.
I saw a reference that > 2.0 of squashfs doesn't work on 2004.3, so I've tried both
squashfs2.1-r2.tar.bz2 and squashfs2.0.tar.gz with no luck.

I enable squash, initrd, etc. in the menuconfig, either patch looks like it goes
in and compiles clean with the kernel. I can mount source.img before and
after the chroot, except on the livecd with a squash mount, hopefully it's
something obvious?

cs
Back to top
View user's profile Send private message
gieltje
n00b
n00b


Joined: 14 Aug 2004
Posts: 59

PostPosted: Fri May 13, 2005 5:12 pm    Post subject: automounts Reply with quote

I am working on an automount script, that first checks what partitions are available and create directorys with the same name (got that);

for x in $(cat /proc/partitions | awk '{print $4}' | awk 'NR > 2');
do
mkdir ${x}
done

So now I have the directory's with the names of the available partitions, now comes the tricky part. I need to determine what type the partitions are, because I want to mount al the ntfs systems with -t captive-ntfs not with the kernel support.

sfdisk -l gives the partition types, and HPFS/NTFS for ntfs at the end. But I can not find a way to harnas it into a shell script.

Can anyone help me?
Back to top
View user's profile Send private message
nd_stew
n00b
n00b


Joined: 13 May 2005
Posts: 3

PostPosted: Mon May 16, 2005 1:19 pm    Post subject: Re: So Close, but Squashed! Reply with quote

nd_stew wrote:


The only variance to the HowTo I see is that I'm doing a stage3 with 2005.0.

loop0 looked good to me so I figured squash must not be in the kernel correctly.
I saw a reference that > 2.0 of squashfs doesn't work on 2004.3, so I've tried both
squashfs2.1-r2.tar.bz2 and squashfs2.0.tar.gz with no luck.

I enable squash, initrd, etc. in the menuconfig, either patch looks like it goes
in and compiles clean with the kernel. I can mount source.img before and
after the chroot, except on the livecd with a squash mount, hopefully it's
something obvious?

cs


Yep, looks like kernel, /proc/filesystems doesn't have squashfs on my livecd. I'm compiling against
vanilla-sources (2.6.11-2) whereas the latest squash is 2.6.9. Anyone else come across this?
2005.0 doesn't come with development-sources, does have gentoo-sources at 2.6.11-r3.
What source is recommended for 2005.0 and squash's 2.6.9?

cs
Back to top
View user's profile Send private message
Bonkie
Guru
Guru


Joined: 28 Oct 2002
Posts: 501
Location: Antwerpen, Belgium

PostPosted: Tue May 17, 2005 6:27 pm    Post subject: Re: [mini-HowTo] Gentoo Linux LiveCD for Dummies! Reply with quote

Its working fine here (many thanks for showing us the way to do this stuff :D), but I have a question that I dont fully understand.

Im currently trying unionfs, shown by a user in a couple of posts earlier, but I was wondering this; Why make tarballs of directories like /var and /etc, when you dont exclude them from your squashed image ???? And since Im not going to create mounts for each of those directories, should I still create the tarballs and unpack them at boot ?? I dont think so (dont see any reason to), but then again, I didn't come up with this whole scheme so I wanted to check first :)

veezi wrote:
Code:
# Mount root and create read-write directories
mount -t squashfs -o loop /cdrom/files/source.img /new > /dev/null 2>&1
mount -t tmpfs -o size=32m none /new/var > /dev/null 2>&1
mount -t tmpfs -o size=32m 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


...

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/


_________________
"I would say we have a 50% chance of survival, but I consider myself an optimist so I'll give us 50,5% ..."
~ Arthur C. Clarke [Physics PHD,SF Writer], when asked about the chances of the human race's survival
Back to top
View user's profile Send private message
Illissius
Guru
Guru


Joined: 31 Jul 2004
Posts: 395
Location: Hungary

PostPosted: Tue May 17, 2005 7:07 pm    Post subject: Re: [mini-HowTo] Gentoo Linux LiveCD for Dummies! Reply with quote

Bonkie wrote:
Its working fine here (many thanks for showing us the way to do this stuff :D), but I have a question that I dont fully understand.

Im currently trying unionfs, shown by a user in a couple of posts earlier, but I was wondering this; Why make tarballs of directories like /var and /etc, when you dont exclude them from your squashed image ???? And since Im not going to create mounts for each of those directories, should I still create the tarballs and unpack them at boot ?? I dont think so (dont see any reason to), but then again, I didn't come up with this whole scheme so I wanted to check first :)

veezi wrote:
Code:
# Mount root and create read-write directories
mount -t squashfs -o loop /cdrom/files/source.img /new > /dev/null 2>&1
mount -t tmpfs -o size=32m none /new/var > /dev/null 2>&1
mount -t tmpfs -o size=32m 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


...

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/


Correct me if I'm wrong, but I believe I did exclude the tarballs, if you'll look at what I posted... but it's been a while since I've looked at it myself (never got around to figuring out how to properly make multisession CDs, which is the next thing I want to do with it), so could be wrong ;).
_________________
Work is punishment for failing to procrastinate effectively.
last.fm
Back to top
View user's profile Send private message
MixMax
n00b
n00b


Joined: 28 Jan 2005
Posts: 73
Location: Finland

PostPosted: Wed May 18, 2005 12:35 pm    Post subject: Reply with quote

Bonkie:
When using unionfs you can forget the tarballs all together.

But if you'r still using the older style you need the tarballs to populate the tempfs so that they can contain writable files. Your right they are ingluded twice in the older style. I changed the build script a while back so that after makeing the tarballs it moves the content of the folders to a temp folder (outside of the image folder) and then greates the squasfs image. and at the end moves the content back. I'm sure this isn't the best way but that freed a lot of valuable space on the cd.

But like sayed b4 I highly recomend moving to unionfs :)
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 ... 13, 14, 15 ... 19, 20, 21  Next
Page 14 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