Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 303531

Summary: PATCH: genkernel should support detection of multiple devices as root
Product: Gentoo Linux Reporter: devsk <funtoos>
Component: New packagesAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: RESOLVED FIXED    
Severity: normal CC: paul, sping, ziga.boehm
Priority: High Keywords: InVCS
Version: 2008.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 351772    
Attachments: Support multiple root device returned from blkid

Description devsk 2010-02-05 04:03:21 UTC
Currently, if blkid returns multiple devices for root based on LABEL (LABEL=abc is a valid input for real_root), genkernel code gets confused and concludes there is no root available. Some RAID0 volumes do return both the participants in RAID0 as the root device. The attached patch makes sure that the genkernel does break in this scenario.
Comment 1 devsk 2010-02-05 04:03:58 UTC
Created attachment 218479 [details, diff]
Support multiple root device returned from blkid
Comment 2 devsk 2010-08-01 17:15:40 UTC
What's up folks? 6months and no action. "Patches just lie there and nobody pays attention" = "signs of a dead project!"
Comment 3 Andreas Aronsson 2010-12-21 21:51:53 UTC
Still no news? Seems good this patch. 
Comment 4 Sebastian Pipping gentoo-dev 2011-01-05 23:03:26 UTC
PS: Adding keyword "Inclusion" to better show this bug's nature in searches...
Comment 5 Sebastian Pipping gentoo-dev 2011-01-11 12:27:16 UTC
I have applied your patch after some local experiments.
Emerge genkernel-99999 (five nines) to get it to your system.

This is the testing I did:
====================================================
# mkdir raid-0-test

# cd raid-0-test

# for i in one two ; do touch $i ; truncate --size $((1024*1024*100)) $i ; sudo losetup -f $i ; done

# sudo losetup -a
/dev/loop0: [fe06]:4337414 ([..]/raid-0-test/one)
/dev/loop1: [fe06]:4337415 ([..]/raid-0-test/two)

# sudo mdadm --create /dev/md0 --level=0 --raid-devices=2 --assume-clean /dev/loop0 /dev/loop1
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.

# sudo /sbin/blkid | fgrep /dev/loop
/dev/loop0: UUID="76d25f06-[..]-4a036839aaef" UUID_SUB="2f6bcd52-[..]-81478c90a685" LABEL="sevendust:0" TYPE="linux_raid_member" 
/dev/loop1: UUID="76d25f06-[..]-4a036839aaef" UUID_SUB="575fa001-[..]-299f64bc7e78" LABEL="sevendust:0" TYPE="linux_raid_member"

# sudo /sbin/blkid -t LABEL=sevendust:0 | cut -d ":" -f 1 2>/dev/null
/dev/loop0
/dev/loop1

# sudo /sbin/blkid -l -t LABEL=sevendust:0 | cut -d ":" -f 1 2>/dev/null
/dev/loop0
====================================================
Comment 6 Sebastian Pipping gentoo-dev 2011-01-11 15:49:36 UTC
*** Bug 290603 has been marked as a duplicate of this bug. ***