LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 02-03-2008, 02:29 AM   #1
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Australia
Distribution: Devuan
Posts: 5,480

Rep: Reputation: Disabled
UUID in initrd query


Hi

according to this thread
http://www.linuxquestions.org/questi...51#post3043051

there is the suggestion that grub will fail if you are using an initrd images that lack UUID.

I tested my grub with Mdv and of course it works.

I am now looking at the unpack of my initrd and here is how I did it that may help others test their own unpack.

My main question is at the end

----------------------------------------------------
Old initial ram disk images may have used loopback devices, mine is cpio archive that is gunzipped.

pwd....response is /home/gordy
cp /boot/initrd.img /home/gordy/ (or whatever the real initrd is, not a symbolic file)
mkdir /home/gordy/unpack
su (or use sudo )
cd /home/gordy/unpack/
gzip -dc /home/gordy/initrd.img | cpio -id

---------short explain...ref man gzip and man cpio---------------
gzip -dc
-d = decompress
c = to standard out

/home/gordy/initrd.img = our copied initrd image that is not a symbolic link

| = pipe the output you just achieved to cpio

cpio
-i = extract using copy-in mode = copy files out of archive
d = create any relevant directories
---------------------------------------------------------------
our new unpack has some new folders : bin/ dev/ etc/ lib/ proc/ sbin@ sys/ sysroot/
and files /bootsplash /init
with folder sbin/ a symbolic link to bin/

empty folders are....proc/ sys/ sysroot/
----------------------------------------------------------------------------------------------

contents of /home/gordy/unpack/lib
libata.ko
sata_via.ko
scsi_mod.ko
scsi_wait_scan.ko
sd_mod.ko
xfs.ko


content of nash

#!/bin/nash

echo "Loading scsi_mod.ko module"
insmod /lib/scsi_mod.ko
echo "Loading libata.ko module"
insmod /lib/libata.ko
echo "Loading sata_via.ko module"
insmod /lib/sata_via.ko
echo "Loading sd_mod.ko module"
insmod /lib/sd_mod.ko
echo "Loading scsi_wait_scan.ko module"
insmod /lib/scsi_wait_scan.ko
echo "Loading xfs.ko module"
insmod /lib/xfs.ko
echo Mounting /proc filesystem
mount -t proc /proc /proc
echo Mounting sysfs
mount -t sysfs none /sys
echo Creating device files
mountdev size=32M,mode=0755
mkdevices /dev
echo Creating root device
mkrootdev /dev/root
resume
echo 1 > /sys/power/suspend2/do_resume
echo 1 > /sys/power/tuxonice/do_resume
echo Mounting root filesystem /dev/root with flags relatime
mount -o relatime --ro -t xfs /dev/root /sysroot
echo Switching to new root
switchroot --movedev /sysroot
echo Initrd finished

---------------------------------------------------------
Credit
the gzip and cpio command I grabbed from
http://www.linuxjournal.com/article/9452
Tech Tips with Gnull and Voyd
-----------------------------------------------------------

Comment

AFAIK there is no UUID support in the initrd.
Can not find uuid in my /boot/config

Questions

1) what is the correct search term for UUID in the kernel?

2) Do you agree that grub can boot with a kernel line that has a root UUID line...with an initrd that does not have UUID support?

many thanks and any feedback is appreciated.

-----
If I solve this I hope to update my howto on grub which is a outdated.

Last edited by aus9; 02-03-2008 at 06:29 AM. Reason: partially resolved
 
Old 02-03-2008, 03:07 AM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 132Reputation: 132
It would appear to me that things like UUID, partition ID or partition path have nothing to do with initrd or the kernel. After all, the initrd or the kernel don't kick in until GRUB has run its course. I'm not an expert but it seems more likely that these things are recorded in the MBR and in your /dev directory so your kernel can use them while it is mounting your system.

Last edited by jay73; 02-03-2008 at 03:08 AM.
 
Old 02-03-2008, 04:30 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,571

Rep: Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500
Quote:
Originally Posted by aus9 View Post
AFAIK there is no UUID support in the initrd.
What about that mkrootdev ???.
Have a read of this thread. LABEL and UUID can be considered similar in this regard.
 
Old 02-03-2008, 05:16 AM   #4
manjunath_v76
LQ Newbie
 
Registered: Feb 2008
Posts: 1

Rep: Reputation: 0
I Need Linux Software
 
Old 02-03-2008, 05:30 AM   #5
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Australia
Distribution: Devuan
Posts: 5,480

Original Poster
Rep: Reputation: Disabled
syg00

wow thanks for the quick reply

man nash appears to have mkrootdev and it says is:

mkrootdev path
Makes path a block inode for the device which should be mounted as root. To determine this device nash uses the device suggested by the root= kernel command line argument (if root=LABEL=XXXXXX or root=UUID=XXXXXX is used devices are probed to find one with that label or uuid). If no root= argument is available, /proc/sys/kernel/real-root-dev provides the device number.

Without your assistance on mkrootdev I would not have thought of running man nash.

I will be forced (heh heh) to update my howto for sure in a couple of weeks...credit to you of course.
 
Old 02-03-2008, 05:38 AM   #6
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Australia
Distribution: Devuan
Posts: 5,480

Original Poster
Rep: Reputation: Disabled
manjunath_v76

I am not sure if you mean live cds or install cds or add on software but a good place to startd for any distro is

www.distrowatch.com

and LQ...this site also has iso images you can d/load
 
Old 02-03-2008, 06:28 AM   #7
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Australia
Distribution: Devuan
Posts: 5,480

Original Poster
Rep: Reputation: Disabled
bugger, its only partially resolved.

re-looking at that man page...above...why would Fedora fail?
 
Old 02-03-2008, 07:29 PM   #8
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Australia
Distribution: Devuan
Posts: 5,480

Original Poster
Rep: Reputation: Disabled
syg00

here is the reason for my whining.

I do not quite like mount changes. mkrootdev already supports UUID. Just let
rootdev=/dev/root if fstabrootdev=(LABEL|UUID) for all cases; nash will
handle it automatically already. Actually this will allow you to remove the
LABEL block in mountCommand.

taken from this page......
http://archives.mandrivalinux.com/co...1/msg00184.php
 
Old 02-03-2008, 07:54 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,571

Rep: Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500Reputation: 3500
Ignore that bit from the other thread - I was hypothesizing as I haven't seen the initrd Fedora (or anyone else) uses. As I said, I never use them, so I haven't looked.
 
Old 02-03-2008, 10:31 PM   #10
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Australia
Distribution: Devuan
Posts: 5,480

Original Poster
Rep: Reputation: Disabled
syg00

ok can we start afresh?

Do you agree with post 5 from man nash...that IF the distro uses nash, then the modern nash supports UUID already?

However, Fedoras more recent than FC3 now appears to use nash, but this link suggests the possibility of ash

http://www.ibm.com/developerworks/li.../l-initrd.html

Others Please note I like this new link ...recommended

Last edited by aus9; 02-03-2008 at 10:37 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Question on initial RAM disk? KiraII Linux - Kernel 4 07-13-2007 01:52 AM
How do i make a Initial Ram Disk? carl0ski Linux - Kernel 2 11-19-2006 04:06 AM
Configuring LiLO Error 'Initial RAM disk.... and is too big to fit between 4M-15M..' elliotfuller Linux - General 1 09-07-2005 11:22 PM
Lilo: kernel doesn't support initial ram disks. ecion Mandriva 22 07-22-2004 10:36 AM
Fatal:Kernel doesn't support initial RAM disks techstar25 Linux - Newbie 4 07-18-2003 07:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:23 AM.

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