LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 10-04-2006, 06:20 AM   #1
bangoram
Member
 
Registered: Jan 2006
Posts: 61

Rep: Reputation: 15
Facing Problem -- Mounting rootfs (CF)




So finally I have installed a Grub Bootloader in my CF card.Even it's working fine.I am able to boot my kernel and initrd image from my CF card but I have got stuck at one place is that necessary that I should also have an root partition in my CF. Finally in between the boot process it's throwing an error that results in an great disappointment.

When I start my system(Thinclient with vmlinuz,initrd.img in the boot folder of my CF card.Is that necessary to create a /root directory???)

I have given the details below if any one body knows about this please help me...

I have started with Grub

grub>root (hd0,0)
grub>kernel (hd0,0)/boot/vmlinuz vga=0X314 root=/dev/loop/0
grub>initrd (hd0,0)/boot/initrd.img
grub>boot

Its started booting

after some time I am getting this error.....

VFS:Mounted root(ext2 filesystem)
attempt to access beyond end of device
01:00 rw=0, want=8303, limit=8192
EXT2-fs error (device ramdisk(1,0)0: ext2_read_inode:unable to read inodeblock _inode=308, block=8302
mount_devfs_fs():unable to mount devfs ,err:-5
attempt to access beyond end of devices
01:00: rw=0, want=8303, limit=8192
EXT2_fs error (device ramdisk(1,0)):ext2_read_inode:unable to read inode block _ inode=309, block=8302
VFS: cannot open root device "loop/0" or 07:00
please append a correct "root=" boot option
kernel panic :VFS: Unable to mount rootfs on 07:00


from these messages I am able to understand a littlebit that I have to mention the location of the root partition.As I have read in some forums that for any embedded equipments initrd will be the final root file system which will be mounted.So is that necessary to include a seperate root partition in the CF card???

Kindly help me to overcome this problem....

Last edited by bangoram; 10-04-2006 at 09:27 AM.
 
Old 10-05-2006, 01:14 AM   #2
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
Is it your CF partition really hd0,0?
 
Old 10-05-2006, 11:45 PM   #3
bangoram
Member
 
Registered: Jan 2006
Posts: 61

Original Poster
Rep: Reputation: 15
Am I supposed to mention hd0 alone?? I havent created any partition in my CF...
 
Old 10-06-2006, 01:46 AM   #4
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
I suppose the flash card would be rather sd than hd.
 
Old 10-09-2006, 11:09 PM   #5
bangoram
Member
 
Registered: Jan 2006
Posts: 61

Original Poster
Rep: Reputation: 15
Smile

I agree this in case if the CF is connected(through USB CF-card reader) to the computer which is already having a harddisk.But in my case I have this CF the only memory device on my thinclient in this scenario (no other option) it has to be hd0...

if the grub.conf is with error the booting process will not start at all but in my case its starting and later its throwing some error related to mounting a root partition.
 
Old 10-10-2006, 02:21 AM   #6
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
How did you create the initrd? It's fine to have that as your final root but that isn't how it's working, it's doing it's part then trying to pivot_root to a real root partition that it can't find. Depending on whether it's a real initrd or initramfs depends on what to do next but first try removing the root= option to the kernel and see what happens.
 
Old 10-11-2006, 03:37 AM   #7
bangoram
Member
 
Registered: Jan 2006
Posts: 61

Original Poster
Rep: Reputation: 15
Smile

I have created this initrd images using Gnome-PXESdruid
(kndly refer http://pxes.sourceforge.net/howtos/ to know further)
Its supporting all these features(kndly refer the image file)
http://pxes.sourceforge.net/presenta...iew/img16.html

By using the above utility I have created the ramdisk compressed image file, this is the initrd.img file the one which I am using in my CF card. Normally these ramdisk images are being used with TFTP boot.I am trying to use this as my final root partition to be mounted.As you have mentioned in your post its trying to mount another root partition for which its searching and since its not available it's throwing an error.Can you please suggest how to disable this pivot_root so that I will make this initrd to work as a final mounted root partition, is that possible??

I have tried removing root= but it's of no use I am getting the same error....
 
Old 10-11-2006, 04:49 PM   #8
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Okay, not sure on this and I don't actually have a way of testing it locally but try using this root option.
Code:
root=/dev/ram
If that doesn't work, try /dev/ram0. Otherwise the next thing I can suggest is manually editing the initrd and hacking away at /linuxrc to get your desired result. Usually an initrd is just a gzipped image file so make a backup to work with, gunzip it to somewhere and mount it as a loopback device. Make your changes, busybox has a built in shell so I'd just start that, and umount, gzip it again and try booting off that.
 
Old 10-12-2006, 01:54 PM   #9
bangoram
Member
 
Registered: Jan 2006
Posts: 61

Original Poster
Rep: Reputation: 15
can u pls tell me how to proceed with disabling this pivot_root option in initrd.img. I have already mounted the image..or otherwise whether by creating a mini root file system will work?? u have any Idea about this??
 
Old 10-12-2006, 06:53 PM   #10
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
So I assume point root to /dev/ram didn't work? It probably should have but moving on...

Initrd images have a /linuxrc file that is usually just a shell script and is executed first up. Once you have the image mounted open that file and edit it. Somewhere near the end you'll see it preparing, mounting the real root and running /sbin/init - you want to edit that bit.

So you tried using root=/dev/ram in Grub? Definitely try that first.
 
Old 10-13-2006, 09:24 AM   #11
bangoram
Member
 
Registered: Jan 2006
Posts: 61

Original Poster
Rep: Reputation: 15
Unhappy

Yes! I tried giving root=/dev/ram and also /dev/ram0 it doesn't work..I am trying to edit the initrd image... is there any way to create an initrd and mini root partition?? any idea about this...
I am trying to run this setup from my (NS-Geode thinclient)-CF card..of 32MB..I am in a process of creating a mini embedded linux for my Thinclient(SBC)...

Last edited by bangoram; 10-13-2006 at 02:57 PM.
 
Old 10-15-2006, 01:23 AM   #12
bangoram
Member
 
Registered: Jan 2006
Posts: 61

Original Poster
Rep: Reputation: 15
Smile

Yes!!

It works!!

Thanks CS-CAM for your valuable and experienced support(hope ur reading this message).You must have seen my previous post, I think it was due to some reasons(Still I am working on that...) I was unable to make with that initrd.img(previous).Recently I have downloaded a new PXES image(ISO) from 2x website and after uncompressing it I have copied the initrd and the linux to my CF card(FAT file system) folder /boot where its booting and working fine.

I re-edited the grub.conf as


grub>root (hd0,0)
grub>kernel /boot/vmlinuz ramdisk_size=16833 ro root=/dev/ram vga=0x314
grub>initrd /boot/pxes.img
grub>boot

it works fine!! I am facing some problem with X server I am working on that too..

this initrd image is having a linuxrc file(as you have mentioned its not in human readable form..) I can't edit it even after mounting, bcause the whole mounted image is a readonly squashfs image.But as of this ISO it doesn't have any root partition seperately so initrd is not Pivot_root ing.The whole iso image size is of 16MB.


Thanks..

Last edited by bangoram; 10-15-2006 at 03:34 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB configuration cobweb Linux - Newbie 3 02-22-2006 02:12 PM
GRUB configuration JSLayton Linux - Newbie 16 10-10-2005 07:40 PM
Grub Configuration Pipedream Linux - Newbie 3 02-13-2005 03:12 PM
Grub configuration unicef2k Red Hat 3 05-12-2004 06:25 AM
GRUB splashimage configuration / update GRUB rudL Linux - Software 1 05-10-2004 07:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 03:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration