Results 1 to 5 of 5

Thread: how change root partition?

  1. #1
    Junior Member
    Join Date
    Feb 2003
    Posts
    1

    how change root partition?

    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.ph...ic&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.

  2. #2
    Junior Member registered user
    Join Date
    Sep 2003
    Location
    UK
    Posts
    19
    Isn't this forum great? Your query answered within a year or your pizza is free

    Yes, well ... I've been trying to do the same thing, and I think I've found the sticking point.

    [SNIP]

    No I haven't. OK, I really don't get this.

    I am also trying to use reiserfs for / and when I try booting without an initrd the kernel won't do it? Does it not recognise reiser without a module?

    --
    Mike

  3. #3
    Member registered user
    Join Date
    Jan 2004
    Location
    Osnabrück, Germany
    Posts
    95
    i've always had great success with clonig partitions using dd when run from a live-cd! Just boot knoppix live-cd and try "sudo dd if=/dev/hda6 of=/dev/hda1" this will even move the filesystem onto another partition. could take a while so rent yourself a good movie

  4. #4
    Senior Member registered user
    Join Date
    Nov 2003
    Posts
    361
    Quote Originally Posted by zz9pluralzalpha
    I am also trying to use reiserfs for / and when I try booting without an initrd the kernel won't do it? Does it not recognise reiser without a module?
    A kernel configured the same way as the default knoppix kernel has the reiserfs support as a module (because that way you can get rid of it if you don't use reiserfs) If you recompile the kernel and specify that you want the reiserfs code directly in the kernel you will be able to boot without an initrd.

  5. #5
    Junior Member registered user
    Join Date
    Sep 2003
    Location
    UK
    Posts
    19
    Thanks both of you.

Similar Threads

  1. change /home to a partition of another disk
    By koen in forum Hdd Install / Debian / Apt
    Replies: 3
    Last Post: 01-17-2005, 11:32 AM
  2. change root password
    By fabian_wuertz in forum General Support
    Replies: 0
    Last Post: 12-14-2004, 05:35 PM
  3. How do i change the root password for knoppix?
    By Pvanderze in forum General Support
    Replies: 1
    Last Post: 03-30-2004, 09:17 AM
  4. How Change date and time password/root /KNOPPIX/usr/bin/kcms
    By redcartlinux9 in forum General Support
    Replies: 0
    Last Post: 11-24-2003, 07:33 PM
  5. Partition table change in linboot.img
    By Canis in forum Hdd Install / Debian / Apt
    Replies: 0
    Last Post: 11-13-2003, 07:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Dell Precision T5820 Workstation 3.70GHz W-2135 No RAM/ GPU/ HDD/ OS picture

Dell Precision T5820 Workstation 3.70GHz W-2135 No RAM/ GPU/ HDD/ OS

$179.98



Dell Precision Tower 7810 Xeon E5-2630 v3 @ 2.40GHz , 32GB Ram, NO HDD, NO OS picture

Dell Precision Tower 7810 Xeon E5-2630 v3 @ 2.40GHz , 32GB Ram, NO HDD, NO OS

$239.99



Dell Precision T7820 2x Xeon Silver 4114 2.20GHz 950W No RAM GPU HDD 4x SATA picture

Dell Precision T7820 2x Xeon Silver 4114 2.20GHz 950W No RAM GPU HDD 4x SATA

$350.48



Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram  2x 550W PSU No HDD picture

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD

$275.00



INTEL XEON E5-2680V4 SR2N7 2.40GHZ CPU picture

INTEL XEON E5-2680V4 SR2N7 2.40GHZ CPU

$11.00



Intel Xeon E5-2699 V4 2.20GHz 55M 22-CORES LGA2011-3 Server Processor 145W SR2JS picture

Intel Xeon E5-2699 V4 2.20GHz 55M 22-CORES LGA2011-3 Server Processor 145W SR2JS

$84.49



DELL Precision 5820 Workstation Xeon W-2123 3.6ghz/NO RAM/NO SSD/P400 Vid picture

DELL Precision 5820 Workstation Xeon W-2123 3.6ghz/NO RAM/NO SSD/P400 Vid

$139.99



Intel Xeon W-2255 SRGV8 3.7GHz 10-Core LGA2066 Server CPU Processor picture

Intel Xeon W-2255 SRGV8 3.7GHz 10-Core LGA2066 Server CPU Processor

$249.99



Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM picture

Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM

$699.00



Intel Xeon Phi 5110P 60-Core 1.053GHz Coprocessor   picture

Intel Xeon Phi 5110P 60-Core 1.053GHz Coprocessor

$50.00