mixedCase
02-20-2003, 05:46 AM
Hi,
Knoppix installs only to a single partition and I would like to change the root partition from /dev/hda6 to /dev/hda1. Having some familiarity with redhat and mandrake, I thought I could just format the needed partitions, copy the data from the current root partition like this:
cp -a /{bin,boot,dev,etc,initrd,lib,root,sbin,tmp,var} /mnt/hda1
cp -a /home/* /mnt/hda11
cp -a /usr/* /mnt/hda14
then add to /etc/lilo.conf a new entry that has a 'root=/dev/hda1' line (the old line 'root=/dev/hda6' had been global, but I made it local), make it the default entry, run lilo, edit the new /etc/fstab (on /dev/hda1) to reflect the new disk layout, and reboot. But when I did that, the root partition was still /dev/hda6. Since the output of
rdev /mnt/hda1/vmlinuz
was '/dev/hda6', I figured maybe the 'hardcoding' of the root partition in the kernel was somehow overriding the lilo setting, so I ran
rdev /mnt/hda1/vmlinuz /dev/hda1
then checked that the hardcoding changed as intended, and rebooted, but that still didn't help. Then I thought that since /dev/root.old was mounted at /initrd, maybe /initrd/linuxrc was playing a role in determining the root partition, so I changed the lines:
echo 256 > /proc/sys/kernel/real-root-dev
...
mount -t ext3 /dev/hda6 /mnt
to instead read:
echo 0x301 > /proc/sys/kernel/real-root-dev
...
mount -t ext3 /dev/hda1 /mnt
and rebooted, but the root partition was still /dev/hda6.
At this point, dmesg says:
Kernel command line: auto BOOT_IMAGE=Linux ro root=301 hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi apm=power-off nomce
Any suggestions appreciated!
Thanks,
John
PS: I asked about this problem at debianhelp.org, and the resulting thread is at this url:
http://www.debianhelp.org/modules.php?op=modload&name=phpBB_14&file=index&action=viewtopic&topic=657&6
The kind folks there couldn't suggest a fix (though their suggestions made this post more complete), but they did wonder why all the hard drives were declared as scsi in the kernel command line, and whether the knoppix kernel was somehow targeted (in some way other than rdev) to hda6. I don't know the answer to either question.
Knoppix installs only to a single partition and I would like to change the root partition from /dev/hda6 to /dev/hda1. Having some familiarity with redhat and mandrake, I thought I could just format the needed partitions, copy the data from the current root partition like this:
cp -a /{bin,boot,dev,etc,initrd,lib,root,sbin,tmp,var} /mnt/hda1
cp -a /home/* /mnt/hda11
cp -a /usr/* /mnt/hda14
then add to /etc/lilo.conf a new entry that has a 'root=/dev/hda1' line (the old line 'root=/dev/hda6' had been global, but I made it local), make it the default entry, run lilo, edit the new /etc/fstab (on /dev/hda1) to reflect the new disk layout, and reboot. But when I did that, the root partition was still /dev/hda6. Since the output of
rdev /mnt/hda1/vmlinuz
was '/dev/hda6', I figured maybe the 'hardcoding' of the root partition in the kernel was somehow overriding the lilo setting, so I ran
rdev /mnt/hda1/vmlinuz /dev/hda1
then checked that the hardcoding changed as intended, and rebooted, but that still didn't help. Then I thought that since /dev/root.old was mounted at /initrd, maybe /initrd/linuxrc was playing a role in determining the root partition, so I changed the lines:
echo 256 > /proc/sys/kernel/real-root-dev
...
mount -t ext3 /dev/hda6 /mnt
to instead read:
echo 0x301 > /proc/sys/kernel/real-root-dev
...
mount -t ext3 /dev/hda1 /mnt
and rebooted, but the root partition was still /dev/hda6.
At this point, dmesg says:
Kernel command line: auto BOOT_IMAGE=Linux ro root=301 hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi apm=power-off nomce
Any suggestions appreciated!
Thanks,
John
PS: I asked about this problem at debianhelp.org, and the resulting thread is at this url:
http://www.debianhelp.org/modules.php?op=modload&name=phpBB_14&file=index&action=viewtopic&topic=657&6
The kind folks there couldn't suggest a fix (though their suggestions made this post more complete), but they did wonder why all the hard drives were declared as scsi in the kernel command line, and whether the knoppix kernel was somehow targeted (in some way other than rdev) to hda6. I don't know the answer to either question.