Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm working on old distro ( slackware 8.1 ) using a kernel 2.4.37.9 and I have the following problem.

I want to use a custom name for boot device, say for example /dev/root1, which can replace the standard IDE device ( /dev/hdc1 ).

In the standard case I have

  title Linux-2.4.37.9 hdc
    root (hd0,0)
    kernel /boot/vmlinuz-2.4.37.9 ro root=/dev/hdc1 console=ttyS0,9600 console=tty0 apm=off

I wanto to replace it as show belowe:

  title Linux-2.4.37.9 ccl-Test
    root (hd0,0)
    kernel /boot/vmlinuz-2.4.37.9 ro root=/dev/ccl1 console=ttyS0,9600 console=tty0 apm=off

Both /dev/hdc1 and /dev/ccl1 are block device with major/minor 22,1 See here:

# ls -la /dev/hdc1 /dev/ccl1
brw-rw----    1 root     disk      22,   1 Jun  9  2002 /dev/hdc1
brw-rw-rw-    1 root     root      22,   1 Feb 20 15:04 /dev/ccl1

In the standard case the boot works well while in te second case, when I'm using the dev /dev/ccl1, I got the following error :

VFS: connot open root device "ccl1" or 00:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 00:00

I also added an initrd which set the real-root-dev

echo 0x2201 > /proc/sys/kernel/real-root-dev

but I got the same error , with a different device value

VFS: connot open root device "ccl1" or 22:01
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 22:01

I also tried to use the device ccl1 as a simple mount when the PC is already running and it works, see belowe

# mount -o -ro -t ext2 /dev/ccl1  /mnt/tmp
# df
Filesystem           1k-blocks      Used Available Use% Mounted on
LABEL=Flash-Root        242678    169769     65399  73% /
/dev/shm                452620      9308    443312   3% /var
/dev/ccl1               242678    169769     65399  73% /mnt/tmp

Any suggestions ?

share|improve this question
    
"Both /dev/hdc1 and /dev/ccl1 are block device with major/minor 22,1" ie, they refer to the same device, correct? 1st question: So where did ccl1 come from? 2nd question (hunch): Are you aware of UUID's? –  goldilocks Feb 20 '13 at 16:01
    
I already tried to boot using UUID and LABEL but it seems that the root didn't alloow the option root=LABEL=xxx and root=UUID=xxxx –  enzo2 Feb 20 '13 at 16:09
    
The reason of the custom ccl1 is because I need to create it at startup inside initrd script in order to mach with the right device wich should change depending of the mother board used. I need somethng to populate the root=xxxx parameter at run-time, and label adn uuid is not working with this kernel. –  enzo2 Feb 20 '13 at 16:12
    
"So where did ccl1 come from?" I create myself manually –  enzo2 Feb 20 '13 at 16:21
    
2.4? Jesus, that's almost 10 years old! –  psusi Oct 6 '13 at 3:39
show 2 more comments

1 Answer 1

Can you maintain /dev/hdc1? If so, create a link named /dev/ccl1 pointing to /dev/hdc1.
I've got some SuSE 8.2 machines with scripts using /dev/hdaX that now work on /dev/hdcX: I created the links and modified grub to hdc. I have no problems with all the mounting/unmounting scripts and it works fine.

share|improve this answer
    
"create a link named /dev/ccl1" I have already tried with a link but I have the same problem. It seems to me that the kernel made some check on value passed to "root=" and allowed only predefined value. –  enzo2 Feb 20 '13 at 16:28
    
You're right, some names were hard coded: unix.stackexchange.com/a/18055/32493 –  asclepix Feb 20 '13 at 17:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.