Booting Ubuntu with BKO

Locating from where does the nfsboot is getting called

Mistory of do_nfsmount

do_nfsmount is defined at two places, why?

  1. /scripts/casper +198
  2. /scripts/nfs +8

My guess is that file /scripts/nfs is not used, it is just present there from older versions and has not been removed.

do_nfsmount function is getting called from /scripts/casper +188 which is from inside of

do_netmount()

and depend on variable

${NETBOOT}

The do_netmount() is getting called from mountroot() which is inside /scripts/casper +581 and the call depends on variable presense of variable ${NETBOOT} which is the boot parameter value of parameter netboot

qemu + ubuntu 9.04 Desktop i386 booting problem

ubuntu-9.04-desktop-i386.iso is refusing to boot over qemu. I am using command line

qemu -cdrom /var/www/ubuntu-9.04-desktop-i386.iso -net nic -net user

It gives error gives error :

[  3.284007]  ..MP-BIOS bug: 8254 timer not connected to IO-APIC

and freezes.
I am using following version of qemu

$ qemu
QEMU PC emulator version 0.10.0, Copyright (c) 2003-2008 Fabrice Bellard

The BIOS number was found and BIOS version used by qemu is as follows

QEMU BIOS - build: 08/15/08
$Revision: 1.209 $date: 2008/06/02 20:08:10$

I had to update my qemu to version 0.10.5 then it started working

$ qemu
QEMU PC emulator version 0.10.5, Copyright (c) 2003-2008 Fabrice Bellard

SQUASHFS error

I am getting following errors in the process of booting. My guess is, most of these errors are related to failure of httpfs in providing requested logical block, but I need to confirm this.

Buffer I/O error on device loop0, logical block 272374
SQUASHFS error: sb_bread is failed reading block 0x845d5
SQUASHFS error: unable to read fragment cache block [211696cb]
SQUASHFS error: unable to read page, block 211696cb, size c115

I have seen this error before, but if I retry the booting then it works. But now, I have failed two consecutive time on local webserver, which is quite alarming.

Ubuntu revisited (in way of debian)

I was preparing to write an email to ubuntu mailing list, here is what I assembled for that email

I have tried booting Knoppix and debian over HTTP, and they work fine.
But I have problem in booting Ubuntu (ubuntu-9.04-desktop-i386.iso) over HTTP.

The procedure followed to boot linux over HTTPFS by me is as follows.
I get hold of ISO of live CD, and get the kernel, initramfs and 
filesystem.squashfs from it.
I host ISO of live CD and "filesystem.squashfs" on webserver.
I modify initramfs to include httpfs and related tools and modules.
I modify "/init" ( "/scripts/casper" in case of ubuntu ) to use httpfs 
for mounting. 
I pass boot parameter "httpfs=http://ip-of-webserver/filesystem.squashfs" 
or "httpfs=http://ip-of-webserver/ubuntu-9.04-desktop-i386.iso"

I have attempted booting with both livecd.iso and filesystem.squashfs.
In both cases, I get different errors.

I know that filesystem is getting mounted with HTTPFS. 
I have verified it from the rescue shell.
I get this rescue shell by executing wrong command in initramfs. 


When I mount "ubuntu-9.04-desktop-i386.iso" I get following error
{{{
Buffer I/O error on device loop0, logical block 272374
SQUASHFS error: sb_bread is failed reading block 0x845d5
SQUASHFS error: unable to read fragment cache block [211696cb]
SQUASHFS error: unable to read page, block 211696cb, size c115
}}}


Then I tried to use debian way of mounting "filesystem.squashfs" for booting.
I get error
{{{
Begin: Running /scripts/init-bottom ...
Done.
run-init: nuking initramfs contents: Directory not empty
Kernel panic - not syncing: Attempted to kill init!
Dumping ftrace buffer:
	(ftrace buffer empty)
}}}


My guess is that, this error is triggered because when "/bin/run-init" 
tries to remove initramfs and fails to remove some file. Most probably it 
can be /dev/loop0 as it is in use by loopback mount command.

I checked debian code, the use of loopback is avoided there.
So, I am doing the same for ubuntu now. 
I wont use loopback and see if it works.



I was wondering what I am doing wrong as the same method works fine with debian.
And when I try to mount ISO itself, I get kernel panic

Got some information about this error on debian wiki which says that

When switching another root device, initrd would pivot_root and then umount the ramdisk. But initramfs is rootfs: 
you shouldn't pivot_root rootfs and can't unmount it. Just delete everything out of it (except the new block device node, if any),
 overmount /, and exec the new init. (The klibc package contains a helper program in utils/run_init.c to do this for you, 
and other packages have adopted this as switch_root.) 

Now, I don't know for sure, which files are not getting deleated and hence causing problem.

A question

what is the differnece between debian script and ubuntu script that filesystem.squashfs is not working with ubuntu, but it works with debian?

  1. comparing d/scripts/live with u/scripts/casper — too different, diff went crazy with this command. They are as good as seperate program who do similar work.
  2. comparing d/bin/run-init with u/bin/run-init, — they are same.
  3. comparing d/init with u/init – not much of difference

This approach is not working for me, I will try another approach.

analyzing run_init.c

My guess is that, run_init.c is the one who is dying, and it seems he does allow you to specify the files which should not be deleted. I want to see how to tell that to run_init.c

  1. Another thing that I want to try out is, what if I dont delete the contents of initramfs? I will remove that check from run_init.c will system still boot?
    1. My guess is that, overmount / may fail.
  2. Now, I need to locate the source code of run_init.c

Ubuntu over iscsi

  1. Following the line of Debian over iscsi, attempted the Ubuntu over iscsi, but it did not worked.

Problem found

  1. From the progress in fedora, it seems that problem is because network is restarting itself, which kills the the network and mounted HTTPFS. Culprits are
    1. /etc/init.d/network
    2. /etc/init.d/NetworkManager

Solution

The temporary hack implemented is Delete these two files before doing run-init. This hack works fine in this case, only problem is that the /etc/resolver.conf entry remains empty so dns resolving does not work. Need to fix this soon.


Navigation

* [[:start|Home]] * [[:about|About our Project]] * [[:download|Download]] * [[:screenshots|Screenshots]] * Documentation * [[:howtos|HowTo Guides]] * [[:appnotes|Application Notes]] * [[:faq:|FAQs]] * [[:doc|General Doc]] * [[:talks|Videos, Talks, and Papers]] * [[:hardwareissues|Hardware Issues]] * [[:mailinglists|Mailing lists]] * [[http://support.etherboot.org/|Bugtracker]] * [[:contributing|Contributing]] * [[:editing_permission|Wiki Edit Permission]] * [[:wiki:syntax|Wiki Syntax]] * [[:contact|Contact]] * [[:relatedlinks|Related Links]] * [[:commerciallinks|Commercial Links]] * [[:acknowledgements|Acknowledgements]] * [[:logos|Logo Art]]

QR Code
QR Code soc:2009:pravin:journal:ubuntubko (generated for current page)