[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#483082: initramfs-tools: Error while detecting rootfs when 'MODULES=dep'



On Tue, 27 May 2008, Glennie Vignarajah wrote:

> > +	eval "$(mount | awk '/ \/dev\// {if ($3 = "/") {print
>                                             ^^^^^^
> > > "root=" $1 "\nFSTYPE=" $5; exit}}')"
> 
> > there seem to be a typo here, awk '/\/dev// {}' without space
> > works better for me.
> 
>  You're right.
>  Moreover, the there is mistake. In fact, '($3 = "/")' *must be* '($3 
> == "/")'.

rethinking i like your hardening with checking that $3 must be '/',
but i don't see so much the point of changing the regex in front.
awk '/ \/ / # ought to be enough.

> The new version is attached.

didn't get the new patch?
if you'd made it applyable with p1 that be a bonus.

> 	No. In fact, On 2 of my machines, the rootfs is mounted 
> on /dev/root. It googled a bit, and this issue is related to be 
> busybox....
> So we have 3 cases here. eval "$(mount | awk '/"... returns
> 	* an UUID when the rootfs is mounted with the 'LABEL=' or 'UUID='. 
> The UUID is a relative symbolic link located in /dev/disk/by-uuid/ 
> pointing to the real device.
> 	* the real disk device.
> 	* /dev/root
> 
> 	When "root=/dev/root", we have to figure out what it is, which is 
> done in the "if" block.

ok ack, no the /dev/root is due to lilo.
it's the naming we gave it in initramfs-tools similar to others.
 
> 	Once we got the symlink to the root device, we can use 'readlink' to 
> get the real device. Using 'readlink' on a file which is not a 
> symlink doesn't matters(case 2).

ack


best regards

-- 
maks



Reply to: