View previous topic :: View next topic |
Author |
Message |
gerzy n00b
Joined: 26 Aug 2003 Posts: 8
|
Posted: Tue Sep 09, 2003 7:54 am Post subject: |
|
|
EDIT: Ignore this post! I've realized that this is a hack that won't get you very far... the real reason for this problem is that the inittab that the livecd-ng build uses is incompatible with the /sbin/rc from the final 1.4 stage3 tarball. The other init scripts need tweaking as well. Look for a follow up post from me with the details once I work them out.
-gerzy
-----------------------------------------------------------------------------
BurnedOutGeek wrote: | Ok. That I can understand, but... IN a message on page 2, someone talks about how the CD could not mount the filesystem as R/W. Has anyone found a fix for this yet or do we just have to use the 1.4-rc4 tarball for now?
Mark |
If you are using the final 1.4 stage3 tarball, you need to add an entry for the root dev in your fstab...
Code: | /dev/root / ext2 defaults 0 0 |
Note that the livecd-ng script will replace the fstab in your cdroot with /etc/livecd-ng/profiles/global/aux-files/fstab when you run "livecd-ng gentoo-basic clean", so this is the best place to make the change. If you have already run "clean", copy this file to ${CD_TMPROOT}/gentoo-basic/cdroot/etc/fstab.
You might also have to add aline somewhere to mount /proc... I added the following line to /etc/init.d/checkroot right after root is mounted read-write:
Code: | mount -n none /proc -t proc |
"checkroot" is also copied from /etc/livecd-ng/profiles/global/aux-files during "clean".
Hope this helps!
Last edited by gerzy on Wed Sep 10, 2003 10:40 am; edited 1 time in total |
|
Back to top |
|
|
Kronos Tux's lil' helper
Joined: 05 Sep 2002 Posts: 116 Location: St. Louis area (Wood River, IL)
|
Posted: Tue Sep 09, 2003 3:38 pm Post subject: |
|
|
Does the stage2 or stage3 gentoo cd include partimage? if so what version?
Kronos |
|
Back to top |
|
|
Kronos Tux's lil' helper
Joined: 05 Sep 2002 Posts: 116 Location: St. Louis area (Wood River, IL)
|
Posted: Tue Sep 09, 2003 4:06 pm Post subject: |
|
|
Also, i can't emerge syslinux because i am getting errors with getting mtools:
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-mtools-3.9.8-r1-30537.log"
chown: /var/cache/edb
chown: /var/cache/edb/dep
open_wr: /var/cache/edb/mtimedb
--------------------------------------------------------------------------------
kronos |
|
Back to top |
|
|
gerzy n00b
Joined: 26 Aug 2003 Posts: 8
|
Posted: Wed Sep 10, 2003 3:13 am Post subject: |
|
|
Thought I'd add one thing to this howto.... I had to perform one extra step to get my Gentoo Live USB Stick to boot...
I'm using a Sony SRX87 and Memory Stick to build the system. The SRX BIOS won't boot off the Mem stick interface but my desktop BIOS will.
I had to add a boot loader at the head of the stick... I used a DOS bootloader that I keep handy in a file. I had to write the boot loader to /dev/sda and not /dev/sda1. I grabbed only the bootlader from the MBR of an HDD that had been sys'ed in DOS. If you do this only grab the first 446 bytes of the MBR... after that you've got the partition table and you don't want your HDD partintion table on your USB stick.
For kicks I tried installing grub as well and, lo and behold... it worked! Assuming you have grub installed on your build machine, that your USB device shows up as hd1 to grub, and your live Gentoo Live USB Stick is prepped and ready to go, you can do the following...
Copy the grub files to the USB stick:
Code: |
# mount -t vfat /dev/sda1 /mnt/usbstick
# cp -a /boot/grub /mnt/usbstick
# umount /mnt/usbstick
|
Grub your memstick... be careful to correctly ID your USB interface!! My system boot partition is ext2 so I knew I had the memstick when grub reported the partition type as fat when I typed the "root" command.
Code: |
# grub
grub> root (hd1,0)
Filesystem type is fat, partition type 0x6
grub> setup (hd1)
grub> quit
|
Put this entry in the grub.conf on the memstick... Notice I switched to hd0 here. This is because the memstick will be the first BIOS drive when you boot off it.
Code: |
title Gentoo
root (hd0,0)
norootverify
chainloader +1
|
That's what worked for me. |
|
Back to top |
|
|
Kronos Tux's lil' helper
Joined: 05 Sep 2002 Posts: 116 Location: St. Louis area (Wood River, IL)
|
Posted: Thu Sep 11, 2003 11:20 pm Post subject: |
|
|
Here's what I am having problems with:
Code: |
hostname livecd-ng # livecd-ng gentoo-basic build
Using current working directory as LIVECD_ROOT.
>>> Extracting stage tarball...
mount: mount point /opt/tmp/gentoo-basic/cdroot/usr/portage does not exist
chroot_generate: aborting.
hostname livecd-ng #
|
Any help? It looks like something simple. But I don't know.
-Kronos |
|
Back to top |
|
|
gerzy n00b
Joined: 26 Aug 2003 Posts: 8
|
Posted: Fri Sep 12, 2003 2:27 am Post subject: |
|
|
Kronos wrote: | Here's what I am having problems with:
Code: |
hostname livecd-ng # livecd-ng gentoo-basic build
Using current working directory as LIVECD_ROOT.
>>> Extracting stage tarball...
mount: mount point /opt/tmp/gentoo-basic/cdroot/usr/portage does not exist
chroot_generate: aborting.
hostname livecd-ng #
|
Any help? It looks like something simple. But I don't know.
-Kronos |
The final 1.4 stage3 tarball doesn't have the /usr/portage directory in it...
you can fix this as follows:
On or about line #175 of /usr/sbin/livecd-ng edit mount_all() to create the directory if it doesn't exist:
Code: |
mount_all() {
mount -o bind /dev $CD_BUILDCHROOT/dev || chroot_die
mount -o bind /proc $CD_BUILDCHROOT/proc || chroot_die
# Added this since the stage3 tarball doesn't have this dir in it
[ ! -e ${CD_BUILDCHROOT}/usr/portage ] && install -d ${CD_BUILDCHROOT}/usr/portage
mount -o bind $CD_PORTDIR $CD_BUILDCHROOT/usr/portage || chroot_die
[ ! -e $CD_BUILDCHROOT/tmp/livecd ] && install -d $CD_BUILDCHROOT/tmp/livecd
mount -o bind $CD_BUILDTEMP $CD_BUILDCHROOT/tmp/livecd || chroot_die
mount -o bind ${CCACHEDIR} ${CD_BUILDCHROOT}/${CCACHEDIR} || chroot_die
mount -o bind $CD_DISTDIR $CD_BUILDCHROOT/home/distfiles || chroot_die
}
|
|
|
Back to top |
|
|
Kronos Tux's lil' helper
Joined: 05 Sep 2002 Posts: 116 Location: St. Louis area (Wood River, IL)
|
Posted: Fri Sep 12, 2003 11:21 pm Post subject: |
|
|
Alright, I used the final stage3 tarball, and has anyone figured out how to get it to boot? I'm not using the usbstick or anything like that to boot. I'm just trying to make a livecd that has partimage on it. Everything worked during the install after a couple of modifications, but it gets can't mount root filesystem type of errors, as follows:
Code: |
* Remounting root filesystem read-only (if necessary)... [ !! ]
* Checking root filesystem... [ ok ]
* Remounting root filesystem read/write...
* Root filesystem could not be mounted R/W :( [ !! ]
Give root password for maintenance
(or type Control-D for normal startup):
|
Someone has been having issues like this but nobody has posted anything regarding this yet, right? Any ideas?
-Kronos |
|
Back to top |
|
|
gerzy n00b
Joined: 26 Aug 2003 Posts: 8
|
Posted: Sat Sep 13, 2003 2:30 am Post subject: |
|
|
Kronos wrote: | Alright, I used the final stage3 tarball, and has anyone figured out how to get it to boot? I'm not using the usbstick or anything like that to boot. I'm just trying to make a livecd that has partimage on it. Everything worked during the install after a couple of modifications, but it gets can't mount root filesystem type of errors, as follows:
...
|
You can fix this by replacing the contents of /etc/livecd-ng/global/inittab with the following:
Code: |
#
# /etc/inittab: This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg, <miquels@cistron.nl>
# Modified by: Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
# Modified by: Daniel Robbins, <drobbins@gentoo.org>
# Modified by: Martin Schlemmer, <azarah@gentoo.org>
#
# Manually tweaked to work with livecd-ng 1.0 and final 1.4 stage3 tarball
#
# Default runlevel.
id:3:initdefault:
# System initialization, mount local filesystems, etc.
si::sysinit:/sbin/rc sysinit
# Further system initialization, brings up the boot runlevel.
rc::bootwait:/sbin/rc boot
l0:0:wait:/sbin/rc shutdown
l1:S1:wait:/sbin/rc single
l2:2:wait:/sbin/rc nonetwork
l3:3:wait:/sbin/rc default
l4:4:wait:/sbin/rc default
l5:5:wait:/sbin/rc default
l6:6:wait:/sbin/rc reboot
z6:6:respawn:/sbin/sulogin
# TERMINALS
c1:12345:respawn:/sbin/mingetty --noclear --autologin tty1
c2:12345:respawn:/sbin/mingetty --noclear --autologin tty2
c3:12345:respawn:/sbin/mingetty --noclear --autologin tty3
c4:12345:respawn:/sbin/mingetty --noclear --autologin tty4
# What to do at the "Three Finger Salute".
ca:12345:ctrlaltdel:/sbin/shutdown -r now
# Used by /etc/init.d/xdm to control DM startup.
# Read the comments in /etc/init.d/xdm for more
# info. Do NOT remove, as this will start nothing
# extra at boot if /etc/init.d/xdm is not added
# to the "default" runlevel.
x:a:once:/etc/X11/startDM.sh
# End of /etc/inittab
|
You should also replace the contents of /etc/livecd-ng/global/aux-files/modules with this to get a working system:
Code: |
#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
#
# Manually tweaked to work with livecd-ng 1.0 and final 1.4 stage3 tarball
depend() {
need checkroot hostname
use isapnp
}
load_modules() {
[ -z "$1" ] && return 0
[ ! -r "$1" ] && return 0
# Loop over every line in $1
(egrep -v "^#|^$" "$1"; echo) | # make sure there is a LF at the end
while read module args
do
[ -z "${module}" ] && continue
ebegin " Loading module ${module}"
modprobe -q ${module} ${args} &>/dev/null
eend $? " Failed to load ${module}"
done
echo
return 0
}
start() {
# Should not fail if kernel do not have module
# support compiled in ...
[ -f /proc/modules ] || return 0
# Here we should fail, as a modular kernel do need
# depmod command ...
if [ ! -x /sbin/depmod ]
then
eerror "ERROR: system is missing /sbin/depmod !"
return 1
fi
ebegin "Calculating module dependencies"
/sbin/update-modules &>/dev/null
eend
if [ -f /etc/modules.autoload -a ! -L /etc/modules.autoload ]
then
einfo "Using /etc/modules.autoload:"
# Loop over every line in /etc/modules.autoload.
load_modules /etc/modules.autoload
else
local KV="$(</proc/sys/kernel/osrelease)"
local KV_MAJOR="`KV_major "${KV}"`"
local KV_MINOR="`KV_minor "${KV}"`"
# New support for /etc/modules.autoload/kernel-$KV
if [ "$(get_KV)" -ge "$(KV_to_int '2.5.0')" ] && \
[ -f /etc/modules.autoload.d/kernel-"${KV_MAJOR}.${KV_MINOR}" ]
then
einfo "Using /etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}:"
load_modules /etc/modules.autoload.d/kernel-"${KV_MAJOR}.${KV_MINOR}"
else
einfo "Using /etc/modules.autoload.d/kernel-2.4:"
load_modules /etc/modules.autoload.d/kernel-2.4
fi
fi
#
# Just in case a sysadmin prefers generic symbolic links in
# /lib/modules/boot for boot time modules we will load these modules
#
if [ -n "$(modprobe -l -t boot)" ]
then
modprobe -a -t boot \* &>/dev/null
fi
}
# vim:ts=4
|
Note that these are mininmally merged from the livecd-ng and final 1.4 stage3 tarball versions of these files. They'll get you up and running though.
EDIT: I forgot to mention that these files are copied to your cdroot when you run "livecd-ng gentoo-basic clean". If you're already passed that point you can manually copy inittab to gentoo-basic/cdroot/etc/ and modules to gentoo-basic/cdroot/etc/init.d/ in your build directory. |
|
Back to top |
|
|
watersb Apprentice
Joined: 04 Sep 2002 Posts: 297 Location: take a left turn in Tesuque
|
Posted: Sat Sep 13, 2003 5:27 pm Post subject: |
|
|
Thanks for a great thread!
If ALL you want to do is to boot from a USB memory stick, I have been able to create a Linux system on a USB memory stick formatted with ext2 that boots just fine.
I have some detailed instructions on a tiny initrd that pivot_root boots the USB stick, if your system cannot boot from the USB storage -- or if BIOSes that can do so indeed require it to be VFAT (instead of ext2).
Of course, this would not be a total solution for a rescue system, since if you lose the boot partition it won't do much good...
But it might be of interest to this thread, so
https://forums.gentoo.org/viewtopic.php?t=31363&start=251 |
|
Back to top |
|
|
Kronos Tux's lil' helper
Joined: 05 Sep 2002 Posts: 116 Location: St. Louis area (Wood River, IL)
|
Posted: Mon Sep 15, 2003 7:26 pm Post subject: |
|
|
Editing those files got my further along, but still nowhere, really:
Quote: |
* Setting hostname to cdimage... [ok]
:command not found
'sbin/rc: /etc/init.d/modules: line 10: sysntax error near unexpected token '
'sbin/rc: /etc/init.d/modules: line 10: '}
/sbin/rc: line 246: error: command not found
* One or more critical startup scripts failed to start!
|
And so on.
The line 10 in /etc/init.d/modules is the closing bracket in:
depend{
need checkroot hostname
use isapnp
}
The line 246 in /sbin/rc this line in start_critical_service():
source "/etc/init.d/${X}" || error "
I logged in as root, hoping that something might just happen to work. But no. I could log in as root alright, but the ethernet wasn't detected, and couldn't insmod it (the machine in particular uses the intel gigabit e1000 driver). Which autodetects using a normal livecd from gentoo. I tried editing the gentoo-basic CD with just adding the partimage binary, but have had no luck there.
Bleh. Any ideas, anyone? |
|
Back to top |
|
|
rensi n00b
Joined: 12 Oct 2002 Posts: 66 Location: Salzburg, Austria
|
Posted: Wed Sep 17, 2003 12:41 pm Post subject: |
|
|
always when I'm trying to execute the script as su I get this error message:
Quote: | bash-2.05b# livecd-ng gentoo-basic build
Using current working directory as LIVECD_ROOT.
>>> Extracting stage tarball...
chroot: /tmp/livecd/stage1-build: Keine Berechtigung
chroot_generate: error: stage 1 build failure
bash-2.05b#
|
for non-german-speaking: "Keine Berechtigung" means "Permission denied"
any hints?
thanks
Reini |
|
Back to top |
|
|
[ToXiC] n00b
Joined: 29 Jul 2003 Posts: 46 Location: Fresno, CA
|
Posted: Sat Sep 27, 2003 6:30 am Post subject: livecd-ng |
|
|
When useing livecd-ng I get the error "mount: mount point /opt/tmp/gentoo-basic/cdroot/usr/portage does not exist" after giving the command "livecd-ng gentoo-basic build." I did a fetch and it worked fine, I dont know why I am getting this error. Can anyone assist me in this? |
|
Back to top |
|
|
Chadduss n00b
Joined: 05 Jul 2003 Posts: 22
|
Posted: Mon Sep 29, 2003 10:45 am Post subject: Re: livecd-ng |
|
|
[ToXiC] wrote: | When useing livecd-ng I get the error "mount: mount point /opt/tmp/gentoo-basic/cdroot/usr/portage does not exist" after giving the command "livecd-ng gentoo-basic build." I did a fetch and it worked fine, I dont know why I am getting this error. Can anyone assist me in this? |
I'm getting the same error. Any ideas anyone?
Thanks |
|
Back to top |
|
|
Chadduss n00b
Joined: 05 Jul 2003 Posts: 22
|
Posted: Mon Sep 29, 2003 9:20 pm Post subject: |
|
|
solved! It said that it did not exsist and was overwritten and I knew that there was a point that it would delete the old directory so I literally did this by force. Here are the steps:
Open up two terminals side by side. Have one setup up as livecd-ng gentoo-basic build and the other one as mkdir /opt/tmp/gentoo-basic/cdroot/var/usr/portage. Hit enter telling the one to build and then click on the other terminal hit enter and then ferociously keep hitting up and then enter eventually it will work. |
|
Back to top |
|
|
[ToXiC] n00b
Joined: 29 Jul 2003 Posts: 46 Location: Fresno, CA
|
Posted: Mon Sep 29, 2003 11:35 pm Post subject: |
|
|
Very primitive but it suppose it worked.
-[ToXiC] |
|
Back to top |
|
|
Chadduss n00b
Joined: 05 Jul 2003 Posts: 22
|
Posted: Mon Sep 29, 2003 11:39 pm Post subject: |
|
|
Hmm now whenever I try to run livecd-ng gentoo-basic initrd I get mount: could not find any device /dev/loop#
Anybody know what I'm doing wrong?
Thanks |
|
Back to top |
|
|
jehreg n00b
Joined: 28 Apr 2002 Posts: 8
|
Posted: Thu Oct 02, 2003 1:39 pm Post subject: |
|
|
Quote: | Hmm now whenever I try to run livecd-ng gentoo-basic initrd I get mount: could not find any device /dev/loop#
|
Yeah, you need to compile the "loop" block device in your kernel.... and when I say "kernel" I mean your main one, not the livecd one. |
|
Back to top |
|
|
ixion l33t
Joined: 16 Dec 2002 Posts: 708
|
Posted: Wed Oct 08, 2003 5:21 pm Post subject: |
|
|
I'm getting this error during the build process -> kernel compile:
Code: |
Root device is (3, 4)
Boot sector 512 bytes.
Setup is 2575 bytes.
System is 3998 kB
System is too big. Try using modules.
make[1]: *** [bzImage] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.20-gentoo-r7/arch/i386/boot'
make: *** [bzImage] Error 2
chroot_generate: error: Chroot kernel/2nd package build failure
|
I had converted everything to kernel-level and not modules... should somethings be compiled in as modules, or is there a way to allow larger kernels?
EDIT:
I went ahead and put some modules in (instead of compiled in) which solved this problem, but the CD I'm eventually going to make I would like to not have Loadable Module Support enabled. Is there a setting I can change to allow bigger kernels? _________________ only the paranoid survive |
|
Back to top |
|
|
DanBUK Tux's lil' helper
Joined: 12 May 2003 Posts: 105 Location: London, UK
|
Posted: Thu Oct 09, 2003 12:11 pm Post subject: Livecd-ng modified to work "out of the box" |
|
|
Hi,
Noltha and I have been working on the livecd-ng system.
We have made changes to the system in the following way:
Works with cloop 1.02
Etc files are stored in a subdir on cdrom to allow for faster dev cycle
when testing etc changes
Added rc option for ease in changing services on livecd
Added all option to run through all the steps needed to make a livecd
from a profile
Fixed inittab/linuxrc to work with 1.4 stages/current portage tree
Added deps syslinux and busybox
wget'ing cloop srcs
The ebuild and tar of livecd-ng are located:
(EDIT)New link: http://livecd.lockedbox.net/ (/EDIT)
(EDIT)Also some small install instructions for newer version: http://livecd.lockedbox.net/install.html (/EDIT)
In order to use this youll need to grab the ebuild and run:
emerge -f livecd-ng-1.1.ebuild
ebuild livecd-ng-1.1.ebuild digest
ACCEPT_KEYWORDS="~x86" emerge livecd-ng-1.1.ebuild
then you will need to edit /root/.livecd-ng
And add the following:
CD_DISTDIR=/usr/portage/distfiles
CD_PORTDIR=/usr/portage
CD_TEMPROOT=/home/home20/livecd/tmp
CD_STAGELOC=/home/home20/livecd/download
Obviously choose a partition for the TEMPROOT and STAGELOC that have
enough space free. For the minimal profile, this will be about 1.5Gb
Once you have done this you should be able as root to run:
Either
A - To generate an ISO in one step
cd /etc/livecd-ng
livecd-ng minimal all
B - To generate an ISO in multiple steps
cd /etc/livecd-ng
livecd-ng minimal fetch
livecd-ng minimal build
livecd-ng minimal enter - Used to make changes to the livecd system
livecd-ng minimal initrdbuild
livecd-ng minimal initrd
livecd-ng minimal auxcp
livecd-ng minimal clean - Use with care will make the ISO smaller but
will make it harder to modifiy the tree and regenerate - This step is
not required.
livecd-ng minimal cloop
livecd-ng minimal isogen
If anyone has any problems with the above please do contact me or noltha
and we will do what we can to help.
Kind Regards,
Daniel.
Last edited by DanBUK on Sun Nov 09, 2003 7:18 pm; edited 2 times in total |
|
Back to top |
|
|
Chadduss n00b
Joined: 05 Jul 2003 Posts: 22
|
Posted: Fri Oct 10, 2003 2:40 am Post subject: |
|
|
Finally! I have gotten everything to work and now it boots up. But I get the same errors as woffer and xanthum
woffer wrote: | Woho, my livecd work now!
but I get the same errors as xanthumn, and an extra error before that...
something about /dev/tty0 not being found while setting keymap. |
xanthum wrote: | woffer: no problem, I had to scan the post several times before I saw that.
I can report near total success with building a bootable livecd
I only have some /etc/runlevels/boot/* error messages saying that checkfs, localmount, clock, and bootmisc could not be started.
However, when I check the status of each service, they say they have started. As I am writing this from within my livecd system, I don't think I need to stress too much.
Thanks for all the help everyone.
|
Anyone found a resolution?
Thanks! |
|
Back to top |
|
|
DanBUK Tux's lil' helper
Joined: 12 May 2003 Posts: 105 Location: London, UK
|
Posted: Fri Oct 10, 2003 2:53 am Post subject: |
|
|
the /dev/tty0 you can fix by turning off devfs automount in the kernel
and the rc errors, if you get the aux-files from within my previous post it should be fixed EDIT(I mean from within the tbz2 i have posted)
Cheers Daniel.
Last edited by DanBUK on Sun Nov 09, 2003 7:18 pm; edited 1 time in total |
|
Back to top |
|
|
Chadduss n00b
Joined: 05 Jul 2003 Posts: 22
|
Posted: Fri Oct 10, 2003 3:12 am Post subject: |
|
|
Thanks for the quick reply.
By turning off automounting devfs at boot that doesnt sacrifice any device detection does it?
And for some strange reason when I click on the link to the tbz2 it just displays random characters, when I choose to save link as it's a txt file.
Thanks again! |
|
Back to top |
|
|
DanBUK Tux's lil' helper
Joined: 12 May 2003 Posts: 105 Location: London, UK
|
Posted: Fri Oct 10, 2003 3:28 am Post subject: |
|
|
the devfs thing, there is a devfs init script and config file, that handle most settings. Default is normally fine
as for the file, try wget'ting it. if its still doing that maybe i need to add a mime type to my apache.... (EDIT) I think Ive fixed the mime issue in apache...Hope so..(/EDIT)
Last edited by DanBUK on Sun Nov 09, 2003 7:19 pm; edited 2 times in total |
|
Back to top |
|
|
Chadduss n00b
Joined: 05 Jul 2003 Posts: 22
|
Posted: Fri Oct 10, 2003 3:52 am Post subject: |
|
|
wget worked (why didn't I think of that?) thanks for the help |
|
Back to top |
|
|
Chadduss n00b
Joined: 05 Jul 2003 Posts: 22
|
Posted: Fri Oct 10, 2003 5:58 am Post subject: Wow! |
|
|
So I decided to give Danbuk's "improved" livecd-ng a try and may I say wow! I didn't run into any trouble at all! It spits out a perfect live-cd!
Thanks to Danbuk and Noltha for a top notch product! |
|
Back to top |
|
|
|