replacing the boot disk. - Linux

This is a discussion on replacing the boot disk. - Linux ; Hi, I am running Linux Slackware Version 8.2? kernel 2.4.20 on a 4gig disk. The disk is getting full, I bought a bigger disk to replace it. I partitioned the new disk, but don't know how to file from the ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: replacing the boot disk.

  1. replacing the boot disk.

    Hi,

    I am running Linux Slackware Version 8.2? kernel 2.4.20 on
    a 4gig disk. The disk is getting full, I bought a bigger disk to
    replace it. I partitioned the new disk, but don't know how to
    file from the old disk to the new disk, one partition at a time.
    Would anyone help me. Do I have to do anything else to make
    the disk bootable?
    Or, is there a better way to do it?

    Thank you.
    Matthew





  2. Re: replacing the boot disk.

    ALEX wrote:
    > Hi,
    >
    > I am running Linux Slackware Version 8.2? kernel 2.4.20 on
    > a 4gig disk. The disk is getting full, I bought a bigger disk to
    > replace it. I partitioned the new disk, but don't know how to
    > file from the old disk to the new disk, one partition at a time.
    > Would anyone help me. Do I have to do anything else to make
    > the disk bootable?
    > Or, is there a better way to do it?


    It is easy to do.

    mkdir /new
    mount /dev/hdbX /new
    cd /
    cp -a boot dev etc /new
    Add any directories to the partition that you need to.

    DON'T try to copy /proc make a new /proc directory instead. Also
    don't try to copy the /new directory over to the new disk.

    When done with that partition unmount it and repeat for the next one.

    When done copying all partitions over, if you are going to move
    the new disk to the /dev that the old disk was at then all you
    need is a working bootdisk to get the system up so you can
    reinstall lilo.

    If you are going to leave the old disk in place then you will
    have to edit /etc/fstab and change the partition devices to the
    correct devices before running lilo.
    eg.. /dev/hdaX to /dev/hdbX

    --
    Confucius: He who play in root, eventually kill tree.
    Registered with The Linux Counter. http://counter.li.org/
    Slackware 9.1.0 Kernel 2.4.24 SMP i686 (GCC) 3.3.2
    Uptime: 10 days, 21:41, 1 user, load average: 1.18, 1.20, 1.12

  3. Re: replacing the boot disk.


    ALEX wrote :

    > I am running Linux Slackware Version 8.2? kernel 2.4.20 on
    > a 4gig disk.


    Slackware 8.2 has never existed. You can alway find your Slackware
    version this way:
    $ 'more /etc/slackware-version'

    > The disk is getting full, I bought a bigger disk to replace it. I
    > partitioned the new disk, but don't know how to file from the old disk
    > to the new disk, one partition at a time.


    Take a look at this "Hard Disk Upgrade Mini How-To":
    /usr/doc/Linux-HOWTOs/Hard-Disk-Upgrade
    --
    Thomas O.

    This area is designed to become quite warm during normal operation.

  4. Re: replacing the boot disk.

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    > I am running Linux Slackware Version 8.2? kernel 2.4.20 on
    > a 4gig disk. The disk is getting full, I bought a bigger disk to
    > replace it. I partitioned the new disk, but don't know how to
    > file from the old disk to the new disk, one partition at a time.
    > Would anyone help me. Do I have to do anything else to make
    > the disk bootable?
    > Or, is there a better way to do it?


    This is how I'd do it (not saying it's the best way or anything.)
    Connect the new disk as the primary master, and the old one as the primary
    slave. (I'll assume the old one was primary master and your cdrom drive is
    secondary master)
    Press tab (I think) when starting lilo, to get the command line, or boot
    from the slackware install cd. At the boot: prompt, enter /boot/vmlinz
    root=/dev/hdbx single where you used to have root=/dev/hdax. It should be
    the partition with your / directory on it. The single tells the kernel to
    boot into single-user mode and skip startup scripts. login as root.
    Your partitions will have failed to mount; mount them manually with mount
    dev/hdbx /location.
    mkdir newhd (or whatever)
    mount /dev/hda1 newhd
    mkdir newhd/home
    mount /dev/hda2 newhd/home
    mkdir newhd/usr
    mount /dev/hda3 /newhd/home
    for all your different partitions. Obviously modify according to your
    partitioning scheme
    then
    cd /
    cp -ax * /newhd
    cd /home
    cp -ax * /newhd/home
    cd /usr
    cp -ax * /newhd/usr
    etc. for all partitions
    Shutdown and remove the old hard drive. Now boot from the slackware boot cd
    and at the prompt boot:/boot/vmlinuz root=/dev/hdax. Check the system is
    okay, then check /etc/lilo.conf is now accurate. Run /sbin/lilo. If you're
    lilo's on mbr that's it, if it's on superblock make sure fdisk has set the
    right partition as primary. After checking all your data is intact, you can
    reformat your old drive, repartition, reattatch it as primary slave, then
    add appropriate entries to /etc/fstab for partitions on it.



    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.3 (GNU/Linux)

    iD8DBQFACEE4seVxKm0DPWERAtwAAKDXaqzNfij+eVjuobojG9 aN65YH5gCfZ/os
    pDksLLGabiXW5+AD72QMsUg=
    =3RFL
    -----END PGP SIGNATURE-----

  5. Re: replacing the boot disk.

    On Fri, 16 Jan 2004 15:41:57 +0000, ALEX enlightened everyone by writting:

    > Hi,
    >
    > I am running Linux Slackware Version 8.2? kernel 2.4.20 on
    > a 4gig disk. The disk is getting full, I bought a bigger disk to
    > replace it. I partitioned the new disk, but don't know how to
    > file from the old disk to the new disk, one partition at a time.
    > Would anyone help me. Do I have to do anything else to make
    > the disk bootable?
    > Or, is there a better way to do it?
    >
    > Thank you.
    > Matthew


    MickeyD has a good approach but you should google for the HOW-TO
    adding/moving a Linux HD. It's not that hard but its been a while.

    I think you should do something like :
    install the new disk as a secondary HD
    boot your slack install
    sudo fdisk where "m" is the help menu
    Make your partitions on the secondary new drive
    You might need to reboot your system after that point
    sudo mkfs -t ext3 the new partitions /dev/hdb1, /dev/hdb2
    sudo mount the new secondary drive partitions
    sudo dd ifs=/dev/hda1/ ofs=/dev/hdb1
    sudo dd ifs=/dev/hda2/ ofs=/dev/hdb2
    etc.
    replace the old primary switching it with the
    new hd reboot and pray.

    Look for the How-tos on adding or moving a Linux partition
    and read the man on fdisk and mkfs.


  6. Re: replacing the boot disk.

    ALEX wrote:
    > Hi,
    >
    > I am running Linux Slackware Version 8.2? kernel 2.4.20 on
    > a 4gig disk. The disk is getting full, I bought a bigger disk to
    > replace it. I partitioned the new disk, but don't know how to
    > file from the old disk to the new disk, one partition at a time.
    > Would anyone help me. Do I have to do anything else to make
    > the disk bootable?
    > Or, is there a better way to do it?
    >
    > Thank you.
    > Matthew
    >
    >
    >
    >

    http://www.partimage.org/

    JohnT


+ Reply to Thread