Find the answer to your Linux question:
Results 1 to 8 of 8
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Want to change hard drive config - what do I do with LILO?

    Hello linuxforums -
    I ask any tips or suggestions from experienced LILO users about how best to go about changing the hard drives from which I run my (currently working - knock on wood) Xandros 3.0.1 installation.

    Here is what I have now:
    /dev/sda = IBM drive
    /sda1 = / (reiserfs)
    /sda2 = /swap (reiserfs)
    /sda3 = /var (reiserfs)
    /sda4 = /home (reiserfs)

    Here is what I want to configure:
    /dev/sda = Seagate drive
    /sda1 = / (reiserfs)
    /sda2 = /swap (reiserfs)
    /sda3 = /var (reiserfs)
    /dev/sdb = Western Digital drive
    /sdb1 = /home (reiserfs)

    What are the critical steps ***and order of those steps*** that I need to take to install and configure LILO to recognize this reconfiguration of partitions and boot properly? I could also appreciate any tips about resizing and re-creating the reiserfs filesystems on the new drives. Thanks!

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Seattle, WA, USA
    Are you completely getting rid of the existing hard drive? If so, then in the process of installing on the new HD, you should be able to set up LILO pretty easily.

    I say that because it looks like you're getting rid of the IBM drive. If I'm incorrect and you're simply adding sdb (and sda is the same drive in both schemes), then, as the partitioning scheme is the same for sda, you won't need to modify LILO at all.

    I am fairly confused by your question: is the sda in the second scheme the same as in the first? If not, how are you planning to transfer your install, or are you reinstalling?

  3. #3
    Thanks for responding, Cabhan. Yes, I should clarify ... I aim to move the existing filesystems (not reinstall if I can avoid it) from their partitions on the IBM drive (currently /dev/sda) over to the Seagate and Western Digital drives. I aim remove the IBM drive completely from the system, leaving the Seagate drive as /dev/sda and the WD drive as /dev/sdb.

    Although I am primarily concerned about LILO with this post, the other possibly tricky part here is to figure out how to successfully transfer the three reiserfs filesystems. The filesystems themselves are small relative to the partitions in which they currently reside on the IBM drive ( / currently occupies about 26%, /var currently occupies about 7%). I want to transfer the filesystems to smaller partitions on the Seagate drive. However, this seems to prevent the comfortably easy option of simply restoring the partimage backups of these partitions to the new drives. Hence the second question at the bottom of the original post ...

  4. $spacer_open
  5. #4
    Oh, and of course the /swap partition is NOT reiserfs ... typo ... my bad!

  6. #5
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Seattle, WA, USA
    While I've only done this once before, it did work.

    You can use the 'dd' command to read from a partition and write to a file (from which you can write to the new partition) or directly to a new partition. I did this transferring from ext3 to ext3 of identical size, but I assume that it will work no matter what.

    The syntax is:
    dd if=[input] of=[output] conv=notrunc
    That last part ("conv=notrunc") is needed if writing to a device and not a file. So for you, you could do something like the following:

    1) Install the Seagate drive as /dev/sdb
    2) Partition and format the Seagate drive
    3) "dd if=/dev/sda1 of=/dev/sdb1 conv=notrunc"
    4) Repeat 3) for each partition (except swap, obviously)
    5) Remove IBM drive and install Seagate as /dev/sda
    6) Install Western Digital as /dev/sdb
    7) Using a LiveCD, reinstall LILO on new sda

    That should work, though I would recommend checking the partitions once you write the first one, just to make sure that all the data copied successfully.

  7. #6
    So I'm pretty sure that I've managed to copy the filesystems over onto the new drives OK -- I discovered that the parted utility has a command (cp) which performs exactly the filesystem copy function that I wanted.

    After copying the filesystems and checking them with reiserfsck, I edited both /etc/fstab and /etc/lilo.conf for the new drive configuration.

    I think I am close ... I just have to figure out yet how to run the LILO configuration to get the bootloader installed into the MBR on the Seagate drive. So far I have tried:
    (1) using the Xandros CD restore function -> It reports that it cannot find a Xandros installation and won't do anything else.
    (2) using the Xandros CD rescue console -> It appears to ignore the Seagate drive altogether and recognizes the WD drive as /dev/sda instead, so I can't even try to chroot into the root partition from here.
    (3) using the SystemRescueCD -> This recognizes the drives and partitions properly and allows me to mount / and /var filesystems on /dev/sda. But I can't figure out how to run LILO on /dev/sda1 from the CD root filesystem. Alternatively, I CAN mount the root filesystem on /dev/sda1 and chroot into it. But if I try to run LILO from here, I just get a Failed_RAID_setup error.

    How can I run the LILO configuration inside the filesystem from outside?

  8. #7
    Hmmm ... I ran the IBM drive from a single wide-SCSI interface on an Adaptec controller. But I replaced this SCSI controller with another Adaptec controller which has both wide and ultra-wide interfaces so that I could run the new multiple drive configuration. I putting the Seagate drive (/dev/sda) on the UW interface, and the WD drive on the wide interface.

    I suspect at this point that my Xandros installation's initrd loads a driver for the controller's wide interface, but not for the UW interface. Before I start working that issue, though, I want to confirm it by getting LILO into the MBR and trying a normal boot to see what happens.

    So the question is still the same ... I can run both drives just fine when I boot from the SystemRescueCD. Suggestions from any experienced LILO and/or SCSI users?

  9. #8
    Ahhh, OK ... to run LILO on a non-running /, you've gotta mount /dev and /var into that / filesystem.

Posting Permissions

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