FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 07-26-2008, 04:25 AM
"Martin Langhoff"
 
Default livecd-creator unmounting temp image, running daemons.

I am using a F9 host to build a F7 liveCD -- the School Server image
-- and I am finding that livecd-creator never manages to unmount the
temporary partition, and the resulting image fails to boot (tested
with qemu and on real hw).

When livecd-creator tries to unmount the CD, two processes are still
running - httpd, and a custom network daemon written in python. lsof
shows them as the only processes keeping files open. Once I kill those
processes, I can unmount cleanly.

Is this expected? Are any incompatibilities with F7 known? Should
livecd-creator try to run all the relevant init scripts with stop, and
perhaps run lsof to see if any programs need to be killed or
kill-9'ed?

The boot failures (fails to load the kernel modules, and kills init)
probably have to do with the image being incomplete.

This is the kickstart file I am using...
http://dev.laptop.org/git?p=projects/xs-livecd;a=blob;f=kickstarts/livecd-auto.ks;h=4dd17a317501701464f6e880ad0ba708145fd1ba ;hb=HEAD

cheers,



martin
--
martin.langhoff@gmail.com
martin@laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-26-2008, 06:21 AM
"Martin Langhoff"
 
Default livecd-creator unmounting temp image, running daemons.

On Sat, Jul 26, 2008 at 4:25 PM, Martin Langhoff
<martin.langhoff@gmail.com> wrote:
> I am using a F9 host to build a F7 liveCD -- the School Server image
> -- and I am finding that livecd-creator never manages to unmount the
> temporary partition, and the resulting image fails to boot (tested
> with qemu and on real hw).

With a bit more work into it, I can resolve the unmounting issue by
stopping the daemons late in %post, however, the boot failures
continue.

They look like this:
Loading vmlinuz0...
Loading initrd0.img...
Ready.
Uncompressing Linux... Ok, booting the kernel.
PCI: PIIX3L Enabling Passive Release on 0000"00:01.0
Red Hat nash version 6.0.9 starting
insmod: error inserting '/lib/ehci-hcd.ko' : -1 File exists
insmod: error inserting '/lib/uhci-hcd.ko' : -1 File exists
insmod: error inserting '/lib/ohci-hcd.ko' : -1 File exists
stabilized: stat /proc/bus/usb/devices: No such file or directory
... and eventually ...

Kernel panic - non syncing: Attempted to kill init!

Any hints as to what to try next, doco or source to read?

cheers,



m
--
martin.langhoff@gmail.com
martin@laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-27-2008, 03:25 AM
"Martin Langhoff"
 
Default livecd-creator unmounting temp image, running daemons.

On Sat, Jul 26, 2008 at 6:21 PM, Martin Langhoff
<martin.langhoff@gmail.com> wrote:
> Any hints as to what to try next, doco or source to read?

After a bit more investigation. the livecd-tools package in F9
(017.1-1.fc9) can only build F9 correctly, and the problem boils down
to incorrect placement of the .ko files in the initrd. Here is how to
repro with F9 vs F7. In my testing, F8 shows the same problems.

1 - Take the fedora-minimal.ks file and replace "rawhide" with
'fedora-9', 'fedora-7' - as follows:

--8<----8<----8<--
lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --disabled
firewall --disabled
part / --size 1024

repo --name=released
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-9&arch=$basearch

%packages
@core
bash
kernel
passwd
policycoreutils
chkconfig
authconfig
rootfiles

%end
--8<----8<----8<--

2 - Build one minimal Liveimage for each. The image should boot to a
login prompt - though it will not allow logins as no root pw has been
set.

3 - Boot the images with qemu -m 512 --cdrom <path-to-iso> -- the F7
iso will panic

4 - mount -o loop both ISOs, in my case in /tmp/f7 /tmp/f9 and extract
the initrd in each

5 - find initrd-7 initrd-9 -type f -name '*.ko'
initrd-7/lib/mbcache.ko
initrd-7/lib/sr_mod.ko
initrd-7/lib/msdos.ko
initrd-7/lib/ext3.ko
initrd-7/lib/ehci-hcd.ko
initrd-7/lib/uhci-hcd.ko
initrd-7/lib/pata_pcmcia.ko
initrd-7/lib/mmc_block.ko
initrd-7/lib/jbd.ko
(...snipped...)
initrd-9/lib/modules/2.6.25-14.fc9.i686/pata_jmicron.ko
initrd-9/lib/modules/2.6.25-14.fc9.i686/ata_generic.ko
initrd-9/lib/modules/2.6.25-14.fc9.i686/pata_qdi.ko
initrd-9/lib/modules/2.6.25-14.fc9.i686/sata_vsc.ko
initrd-9/lib/modules/2.6.25-14.fc9.i686/sata_sil24.ko
initrd-9/lib/modules/2.6.25-14.fc9.i686/pata_hpt366.ko

Additionally, I have a F7 liveCD built elsewhere (with an earlier,
patched version of livecd-tools) that boots successfully - the initrd
of that liveCD looks like
find initrd-7-good -type f -name '*.ko' | head
initrd-7-good/lib/modules/2.6.23.1-21.fc7/pata_jmicron.ko
initrd-7-good/lib/modules/2.6.23.1-21.fc7/ata_generic.ko
initrd-7-good/lib/modules/2.6.23.1-21.fc7/pata_qdi.ko
initrd-7-good/lib/modules/2.6.23.1-21.fc7/sata_vsc.ko
initrd-7-good/lib/modules/2.6.23.1-21.fc7/sata_sil24.ko
initrd-7-good/lib/modules/2.6.23.1-21.fc7/pata_hpt366.ko
initrd-7-good/lib/modules/2.6.23.1-21.fc7/mbcache.ko
initrd-7-good/lib/modules/2.6.23.1-21.fc7/sata_sx4.ko
initrd-7-good/lib/modules/2.6.23.1-21.fc7/pata_serverworks.ko
initrd-7-good/lib/modules/2.6.23.1-21.fc7/sr_mod.ko

I am not sure why this is happening, but I keep working on this.

regards,



martin
--
martin.langhoff@gmail.com
martin@laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-27-2008, 05:10 AM
"Martin Langhoff"
 
Default livecd-creator unmounting temp image, running daemons.

On Sun, Jul 27, 2008 at 3:25 PM, Martin Langhoff
<martin.langhoff@gmail.com> wrote:
> After a bit more investigation. the livecd-tools package in F9
> (017.1-1.fc9) can only build F9 correctly, and the problem boils down
> to incorrect placement of the .ko files in the initrd. Here is how to
> repro with F9 vs F7. In my testing, F8 shows the same problems.

I tracked this down to the switch from mayflower to mkinitrd, which
lead me to commit
11dbd0bb5ba4b845e80109e990e4e780ca402218 where mayflower gets
installed and called during %post.

So I updated my ks file as below. This still fails to build a bootable
F8 or F7, both drop to an emergency shell after failing to find root
(see below for more details). I am using git's master for these
builds.

Current kickstart file

--8<----8<----8<--
lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --disabled
firewall --disabled
part / --size 1024

repo --name=released
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-8&arch=$basearch

%packages
@core
bash
kernel
passwd
policycoreutils
chkconfig
authconfig
rootfiles

# for live initrd
livecd-tools
# livecd bits to set up the livecd and be able to install
anaconda
#isomd5sum

%end

%post
# make the initrd we care about
rm -f /boot/initrd*.img
cp /etc/sysconfig/mkinitrd /etc/mayflower.conf
ver=`ls /boot/vmlinuz* |head -n 1 |sed -e 's;/boot/vmlinuz-;;'`
/usr/lib/livecd-creator/mayflower -f /boot/initrd-$ver.img $ver
rm -f /etc/mayflower.conf
%end

%post --nochroot
# move the initrd we created to be the booted one
mv $INSTALL_ROOT/boot/initrd-*.img $LIVE_ROOT/isolinux/initrd0.img
%end
--8<----8<----8<--

With this ks file, the initrd is now built correctly. But during boot
with F8 I see all sorts of odd errors:

WARNING: Bogus /etc/fstab file - cannot have /dev/root as the device for /
...
starting udevd
creating devices
waiting for system to settle
...
SQUASHFS error: Major/Minor mismatch, trying to mount newer 3.1 filesystem
SQUASHFS error: Please update your kernel
mount: wrong fstype ...

Once on the shell, the dmesg output looks normal except for the
Squashfs errors, and ls /dev/ does not contain anything that looks
like a usable block device. Trying to mount /dev/loop0 gives me the
same squashfs error as before.

hmmmm? hints?



m
--
martin.langhoff@gmail.com
martin@laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-27-2008, 08:00 AM
Jerry Vonau
 
Default livecd-creator unmounting temp image, running daemons.

Martin Langhoff wrote:
> On Sun, Jul 27, 2008 at 3:25 PM, Martin Langhoff
> <martin.langhoff@gmail.com> wrote:
>> After a bit more investigation. the livecd-tools package in F9
>> (017.1-1.fc9) can only build F9 correctly, and the problem boils down
>> to incorrect placement of the .ko files in the initrd. Here is how to
>> repro with F9 vs F7. In my testing, F8 shows the same problems.
>
> I tracked this down to the switch from mayflower to mkinitrd, which
> lead me to commit
> 11dbd0bb5ba4b845e80109e990e4e780ca402218 where mayflower gets
> installed and called during %post.
>
> So I updated my ks file as below. This still fails to build a bootable
> F8 or F7, both drop to an emergency shell after failing to find root
> (see below for more details). I am using git's master for these
> builds.
>
> Current kickstart file
>
> --8<----8<----8<--
> lang en_US.UTF-8
> keyboard us
> timezone US/Eastern
> auth --useshadow --enablemd5
> selinux --disabled
> firewall --disabled
> part / --size 1024
>
> repo --name=released
>
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-8&arch=$basearch
>
> %packages
> @core
> bash
> kernel
> passwd
> policycoreutils
> chkconfig
> authconfig
> rootfiles
>
> # for live initrd
> livecd-tools
> # livecd bits to set up the livecd and be able to install
> anaconda
> #isomd5sum
>
> %end
>
> %post
> # make the initrd we care about
> rm -f /boot/initrd*.img
> cp /etc/sysconfig/mkinitrd /etc/mayflower.conf
> ver=`ls /boot/vmlinuz* |head -n 1 |sed -e 's;/boot/vmlinuz-;;'`
> /usr/lib/livecd-creator/mayflower -f /boot/initrd-$ver.img $ver
> rm -f /etc/mayflower.conf
> %end
>
> %post --nochroot
> # move the initrd we created to be the booted one
> mv $INSTALL_ROOT/boot/initrd-*.img $LIVE_ROOT/isolinux/initrd0.img
> %end
> --8<----8<----8<--
>
> With this ks file, the initrd is now built correctly. But during boot
> with F8 I see all sorts of odd errors:
>
> WARNING: Bogus /etc/fstab file - cannot have /dev/root as the device
for /
> ...
> starting udevd
> creating devices
> waiting for system to settle
> ...
> SQUASHFS error: Major/Minor mismatch, trying to mount newer 3.1
filesystem
> SQUASHFS error: Please update your kernel
> mount: wrong fstype ...
>

The squsashfs-tools/kernel module on the fc7/8 live disks is to old to
mount the squashfs.img created on the newer f9 box.


> Once on the shell, the dmesg output looks normal except for the
> Squashfs errors, and ls /dev/ does not contain anything that looks
> like a usable block device. Trying to mount /dev/loop0 gives me the
> same squashfs error as before.
>
> hmmmm? hints?
>
>
>
> m

Think you would need to include, maybe recompile, the squashfs-tools rpm
from the f9. Then I think you'll need to recompile the kernel module and
include it in the initrd. I can't recall when this update to squashfs
occurred, but I believe it was tied to a kernel update between fedora
releases 8-9. so I'm not sure if the above will even work.

Jerry




--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-27-2008, 08:45 AM
"Martin Langhoff"
 
Default livecd-creator unmounting temp image, running daemons.

On Sun, Jul 27, 2008 at 8:00 PM, Jerry Vonau <jvonau@shaw.ca> wrote:
> The squsashfs-tools/kernel module on the fc7/8 live disks is to old to
> mount the squashfs.img created on the newer f9 box.

Interesting. F7 contains squashfs-tools-3.2-1, vs 3.3-2 in F9 and the
changelog doesn't say anything too explicit about a break on storage
format.

Two things look suspicious - sparse files support and the change in
default block size.

> Think you would need to include, maybe recompile, the squashfs-tools rpm
> from the f9. Then I think you'll need to recompile the kernel module and
> include it in the initrd. I can't recall when this update to squashfs
> occurred, but I believe it was tied to a kernel update between fedora
> releases 8-9. so I'm not sure if the above will even work.

Sounds complex. I will try going in the opposite direction: downgrade
the package on F9 or pass flags to disable the new fanciness.

thanks for the hints!



m
--
martin.langhoff@gmail.com
martin@laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-27-2008, 10:16 AM
"Martin Langhoff"
 
Default livecd-creator unmounting temp image, running daemons.

On Sun, Jul 27, 2008 at 8:45 PM, Martin Langhoff
<martin.langhoff@gmail.com> wrote:
> Sounds complex. I will try going in the opposite direction: downgrade
> the package on F9 or pass flags to disable the new fanciness.

Right - with the following patch to fs.py the F7 kernel won't panic
anymore, and a basic F8 will boot. The mkfs tweak is probably
unneeded, the main difference seems to come from -no-sparse:

--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -38,7 +38,7 @@ def makedirs(dirname):
raise

def mksquashfs(in_img, out_img):
- args = ["/sbin/mksquashfs", in_img, out_img]
+ args = ["/sbin/mksquashfs", in_img, out_img, '-no-sparse', '-b', '131072']

if not sys.stdout.isatty():
args.append("-no-progress")
@@ -200,7 +200,7 @@ class SparseExtLoopbackMount(SparseLoopbackMount):

def __format_filesystem(self):
rc = subprocess.call(["/sbin/mkfs." + self.fstype,
- "-F", "-L", self.fslabel,
+ '-I', '128', "-F", "-L", self.fslabel,
"-m", "1", "-b", str(self.blocksize),
self.lofile,
str(self.size / self.blocksize)])


On F7 - my actual target ATM - the problem is not gone through. Init
is dropping me to a panic shell, and I cannot figure out how to get
something I can mount there. When I get dropped in the shell, lsmod
makes it seem like no interesting modules have been loaded.
modprobe-ing libata, cdrom and other modules works. I don't know the
major/minor numbers enough to mknod my way around here.

So I suspect of the initrd, but I am unsure of what to do next. The
mayflower initrd seems to work though it does throw some (IMO)
meaningless errors - complaining about old module names that are not
relevant to the 2.6.23 kernel I have:

Building an initramfs at /boot/initrd-2.6.23.1-21.fc7.img for kernel
2.6.23.1-21.fc7
FATAL: Module ide_cd not found.
FATAL: Module =ata not found.
FATAL: Module usbhid not found.
FATAL: Module ieee1394 not found.
Done; initramfs is 4.2M.

any more hints on this track?

TIA,




martin
--
martin.langhoff@gmail.com
martin@laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-27-2008, 02:08 PM
Kevin Kofler
 
Default livecd-creator unmounting temp image, running daemons.

Martin Langhoff <martin.langhoff <at> gmail.com> writes:
> I am using a F9 host to build a F7 liveCD -- the School Server image

How about not running the school server on an OS which gets no more upgrades,
not even critical security upgrades??? Fedora 7 is no longer supported, so of
course there will be no efforts made to make modern live CD tools work with it.

Kevin Kofler

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-27-2008, 04:52 PM
Jerry Vonau
 
Default livecd-creator unmounting temp image, running daemons.

Martin:
Your cc to the livecd list are not appearing there, are you subscribed?

Martin Langhoff wrote:
> On Sun, Jul 27, 2008 at 8:45 PM, Martin Langhoff
> <martin.langhoff@gmail.com> wrote:
>> Sounds complex. I will try going in the opposite direction: downgrade
>> the package on F9 or pass flags to disable the new fanciness.
>
> Right - with the following patch to fs.py the F7 kernel won't panic
> anymore, and a basic F8 will boot. The mkfs tweak is probably
> unneeded, the main difference seems to come from -no-sparse:
>

Think the issue is going to be how the kernel modules differ from
version 3.2 and 3.3 of squashfs-tools.

So lets get this clear, F7 is using the 2.6.23.?? and does not boot,
F8 is now booting correctly? with which kernel?

> --- a/imgcreate/fs.py
> +++ b/imgcreate/fs.py
> @@ -38,7 +38,7 @@ def makedirs(dirname):
> raise
>
> def mksquashfs(in_img, out_img):
> - args = ["/sbin/mksquashfs", in_img, out_img]
> + args = ["/sbin/mksquashfs", in_img, out_img, '-no-sparse', '-b',
'131072']
>
> if not sys.stdout.isatty():
> args.append("-no-progress")
> @@ -200,7 +200,7 @@ class SparseExtLoopbackMount(SparseLoopbackMount):
>
> def __format_filesystem(self):
> rc = subprocess.call(["/sbin/mkfs." + self.fstype,
> - "-F", "-L", self.fslabel,
> + '-I', '128', "-F", "-L", self.fslabel,
> "-m", "1", "-b", str(self.blocksize),
> self.lofile,
> str(self.size / self.blocksize)])
>
>
> On F7 - my actual target ATM - the problem is not gone through. Init
> is dropping me to a panic shell, and I cannot figure out how to get
> something I can mount there. When I get dropped in the shell, lsmod
> makes it seem like no interesting modules have been loaded.
> modprobe-ing libata, cdrom and other modules works. I don't know the
> major/minor numbers enough to mknod my way around here.
>

see above

> So I suspect of the initrd, but I am unsure of what to do next. The
> mayflower initrd seems to work though it does throw some (IMO)
> meaningless errors - complaining about old module names that are not
> relevant to the 2.6.23 kernel I have:
>
> Building an initramfs at /boot/initrd-2.6.23.1-21.fc7.img for kernel
> 2.6.23.1-21.fc7
> FATAL: Module ide_cd not found.
> FATAL: Module =ata not found.
> FATAL: Module usbhid not found.
> FATAL: Module ieee1394 not found.
> Done; initramfs is 4.2M.
>
> any more hints on this track?
>

Think the only way you'll get this to fly is to get the source for
squashfs-tools3.3 http://www.squashfs-lzma.org/dl/squashfs3.3.tar.gz
and patch your 2.6.23 kernel and recompile the module and replace the
module in the initrd. There is a good post on the livecd list about
patching squashfs for lsma support and covers all the steps, perhaps you
could adapt the steps(leave out the lzma patches).
https://www.redhat.com/archives/fedora-livecd-list/2008-July/msg00007.html
https://www.redhat.com/archives/fedora-livecd-list/2008-July/msg00005.html
Repacking is initrd and iso are not that hard, but I have some notes
around if you need them.

Jerry


--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-27-2008, 07:13 PM
Jerry Vonau
 
Default livecd-creator unmounting temp image, running daemons.

Kevin Kofler wrote:
> Martin Langhoff <martin.langhoff <at> gmail.com> writes:
>> I am using a F9 host to build a F7 liveCD -- the School Server image
>
> How about not running the school server on an OS which gets no more
upgrades,
> not even critical security upgrades??? Fedora 7 is no longer
supported, so of
> course there will be no efforts made to make modern live CD tools work
with it.
>
> Kevin Kofler
>

Yea, you should try to get "School Server image" working as a "spin".
Have you tried the --base-on= option to livecd-tools and try to re-spin,
with the f7 live disk as the source, with a later distro? This, I think,
would be the same as doing a yum upgrade on the F7 release and
re-rolling it.

Jerry






--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 12:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org