Loading ...
Sorry, an error occurred while loading the content.

[nslu2-linux] Moving debian_slug to a new HD

Expand Messages
  • feffer
    I made an image of the / partition on the old (working) hd by attaching it to a linux machine and running partimage. I then used gparted to make partitions on
    Message 1 of 8 , Jan 24, 2009
    • 0 Attachment
      I made an image of the / partition on the old (working) hd by attaching it to
      a linux machine and running partimage. I then used gparted to make
      partitions on a new, larger hd and restored the image to it. However, I'm
      not sure what I have to do to get the new hd to boot. I read and searched
      extensively on the site, and am still confused. I saw some information that
      seemed to fit on http://www.nslu2-linux.org/wiki/HowTo/MountDisksByLabel but
      that page indicates that the kernel won't recognize /etc/fstab (because it
      doesn't mount until later) However the information about how to point the
      kernel to the root filesystem seems complicated, and then discusses the
      "root filesystem bug." Am I on the right track?

      I've been using my existing setup for over a year and have tweaked it quite
      a bit. I don't really want to start all over and reinstall debian if I don't
      have to. What's the best way to move to a different hd?
      thx,
      feffer
      --
      View this message in context: http://www.nabble.com/Moving-debian_slug-to-a-new-HD-tp21638450p21638450.html
      Sent from the Nslu2 - Linux mailing list archive at Nabble.com.
    • feffer
      ... After making the original post, I found this howto: http://www.nslu2-linux.org/wiki/HowTo/PrepareASpareSystemDiskForMyNSLU2 It also seems overly complex,
      Message 2 of 8 , Jan 24, 2009
      • 0 Attachment
        feffer wrote:
        >
        > I've been using my existing setup for over a year and have tweaked it
        > quite a bit. I don't really want to start all over and reinstall debian if
        > I don't have to. What's the best way to move to a different hd?
        >
        After making the original post, I found this howto:
        http://www.nslu2-linux.org/wiki/HowTo/PrepareASpareSystemDiskForMyNSLU2 It
        also seems overly complex, but may be simpler since I plan to keep the same
        partitioning scheme as on the old disk.

        Please tell me if I'm wrong, but the problem with moving an existing
        debian_slug system to a new hd is basically that the kernel resides on the
        nslu2 firmware and points to the root system on the hd, and this pointer
        gets disrupted when formatting and copying to the new disk. There are
        basically three ways to resolve this:
        1. A total re-install of debian using the new disk. This would be my last
        choice because of all the configuration that I've done on the original
        install (over a year ago).
        2. Use the PrepareASpareSystemDiskForMyNSLU2 howto to recreate the
        partitions to have the same partition table as the old drive (at least the
        same root one).
        3. Use the MountDisksByLabel howto and recreate the initramfs (also refers
        to http://www.nslu2-linux.org/wiki/Debian/ChangeKernelCommandLine ) The idea
        here is to make your new partitions and then get the kernel pointed to them.

        I hope I'm wrong and that there's an easier way to do this, but either way
        I'd like get some feedback before I dive into this. I really love my slug
        and use it as a print server, music server, and backup machine (with rsync
        and rdiff-backup), so help is greatly appreciated.
        thx, feffer
        --
        View this message in context: http://www.nabble.com/Moving-debian_slug-to-a-new-HD-tp21638450p21646467.html
        Sent from the Nslu2 - Linux mailing list archive at Nabble.com.
      • Martin Michlmayr
        ... It shouldn t get disrupted. Debian stores the root device in flash, so unless you modified your /etc/fstab to uuse labels or UUIDs, your flash will
        Message 3 of 8 , Jan 25, 2009
        • 0 Attachment
          * feffer <feffer777@...> [2009-01-24 15:13]:
          > Please tell me if I'm wrong, but the problem with moving an existing
          > debian_slug system to a new hd is basically that the kernel resides on the
          > nslu2 firmware and points to the root system on the hd, and this pointer
          > gets disrupted when formatting and copying to the new disk.

          It shouldn't get disrupted. Debian stores the root device in flash,
          so unless you modified your /etc/fstab to uuse labels or UUIDs, your
          flash will contain something like /dev/sdaX.

          So when preparing your new disk, all you have to make sure that the
          root partition is still on /dev/sdaX. If you use the same partition
          scheme for the new disk as for the old disk (i.e. sda1 remains sda1,
          sda2 remains sda2; the size of the partition doesn't matter) then it
          should boot.

          You have to prepare the partitions with mkfs.ext3 or mkswap, and then
          copy the data with tar.

          --
          Martin Michlmayr
          http://www.cyrius.com/
        • feffer
          ... Backed up and wiped the target disk, ran fdisk /dev/sda and got: WARNING: GPT (GUID Partition Table) detected on /dev/sda ! The util fdisk doesn t
          Message 4 of 8 , Jan 25, 2009
          • 0 Attachment
            Martin Michlmayr wrote:
            >
            > It shouldn't get disrupted. Debian stores the root device in flash,
            > so unless you modified your /etc/fstab to uuse labels or UUIDs, your
            > flash will contain something like /dev/sdaX.
            >
            > So when preparing your new disk, all you have to make sure that the
            > root partition is still on /dev/sdaX.
            >
            > You have to prepare the partitions with mkfs.ext3 or mkswap, and then
            > copy the data with tar.
            >
            Backed up and wiped the target disk, ran fdisk /dev/sda and got: "WARNING:
            GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't
            support GPT. Use GNU Parted." The drive is a Seagate FreeAgent 500 gig, so
            that could be the problem. Is there a way to remove the Seagate GUID
            Partition Table? Is there another way to work around this?

            --
            View this message in context: http://www.nabble.com/Moving-debian_slug-to-a-new-HD-tp21638450p21656692.html
            Sent from the Nslu2 - Linux mailing list archive at Nabble.com.
          • Christof Hanke
            ... You could use a live-system like knoppix on a desktop machine or laptop and use GNU Parted then on the USB-disk.
            Message 5 of 8 , Jan 25, 2009
            • 0 Attachment
              On Sunday 25 January 2009 23:07:11 feffer wrote:
              > Martin Michlmayr wrote:
              > > It shouldn't get disrupted. Debian stores the root device in flash,
              > > so unless you modified your /etc/fstab to uuse labels or UUIDs, your
              > > flash will contain something like /dev/sdaX.
              > >
              > > So when preparing your new disk, all you have to make sure that the
              > > root partition is still on /dev/sdaX.
              > >
              > > You have to prepare the partitions with mkfs.ext3 or mkswap, and then
              > > copy the data with tar.
              >
              > Backed up and wiped the target disk, ran fdisk /dev/sda and got: "WARNING:
              > GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't
              > support GPT. Use GNU Parted." The drive is a Seagate FreeAgent 500 gig, so
              > that could be the problem. Is there a way to remove the Seagate GUID
              > Partition Table? Is there another way to work around this?
              You could use a live-system like knoppix on a desktop machine or laptop and
              use GNU Parted then on the USB-disk.
            • rincewindcook
              ... attaching it to ... However, I m ... searched ... information that ... http://www.nslu2-linux.org/wiki/HowTo/MountDisksByLabel but ... (because it ...
              Message 6 of 8 , Jan 26, 2009
              • 0 Attachment
                --- In nslu2-linux@yahoogroups.com, feffer <feffer777@...> wrote:
                >
                >
                > I made an image of the / partition on the old (working) hd by
                attaching it to
                > a linux machine and running partimage. I then used gparted to make
                > partitions on a new, larger hd and restored the image to it.
                However, I'm
                > not sure what I have to do to get the new hd to boot. I read and
                searched
                > extensively on the site, and am still confused. I saw some
                information that
                > seemed to fit on
                http://www.nslu2-linux.org/wiki/HowTo/MountDisksByLabel but
                > that page indicates that the kernel won't recognize /etc/fstab
                (because it
                > doesn't mount until later) However the information about how to
                point the
                > kernel to the root filesystem seems complicated, and then discusses the
                > "root filesystem bug." Am I on the right track?
                >
                > I've been using my existing setup for over a year and have tweaked
                it quite
                > a bit. I don't really want to start all over and reinstall debian if
                I don't
                > have to. What's the best way to move to a different hd?
                > thx,
                > feffer



                I dont know if this will help you, but I made a clone of my Unslung
                system disk using Acronis True Image Home. See this thread for more
                info
                http://tech.groups.yahoo.com/group/nslu2-linux/message/22951
                This was very easy to do and worked perfectly.
              • feffer
                ... The problem was not so much copying the system, I was able to do it to another drive using tar. I m sure Acronis, partimage and dd also work. The issue was
                Message 7 of 8 , Jan 28, 2009
                • 0 Attachment
                  rincewindcook wrote:
                  >
                  > I dont know if this will help you, but I made a clone of my Unslung
                  > system disk using Acronis True Image Home. See this thread for more
                  > info
                  > http://tech.groups.yahoo.com/group/nslu2-linux/message/22951
                  > This was very easy to do and worked perfectly.
                  >
                  The problem was not so much copying the system, I was able to do it to
                  another drive using tar. I'm sure Acronis, partimage and dd also work. The
                  issue was the GUID partition table on the Seagate FreeAgent drive that I
                  wanted to use. It would not partition with fdisk, but I got the message that
                  parted should be used. Parted has an option for replacing the GPT with an
                  msdos MBR. After that, fdisk could partition the drive and debian installed
                  normally.

                  I bit the bullet and did a new install with lenny. I tried an update with
                  the MyBook test drive and it became unbootable. I changed the apt
                  sources.list from "etch" to "lenny" and did "apt-get update && apt-get
                  dist-upgrade" which seemed to work OK, but as I said it would not boot.

                  So I have some reconfiguration to do on the new system.

                  Regards,
                  feffer
                  --
                  View this message in context: http://www.nabble.com/Moving-debian_slug-to-a-new-HD-tp21638450p21719534.html
                  Sent from the Nslu2 - Linux mailing list archive at Nabble.com.
                • feffer
                  ... Solution, in case anyone else has an issue installing on a Seagate or other drive with a GUID Partition Table (GPT), and has trouble. Trying to use fdisk
                  Message 8 of 8 , Feb 3, 2009
                  • 0 Attachment
                    feffer wrote:
                    >
                    > ...OK, the GUID on the Seagate is definitely an issue. I was able to copy
                    > the system to a borrowed MyBook hd with no GUID and fdisk, formatting and
                    > boot worked fine, but I returned the hd after testing. So now I have to
                    > resolve the GUID table on the Seagate. Can I use GRUB to overwrite the GPT
                    > with a BIOS-type MBR? Or should I do this another way?
                    >
                    Solution, in case anyone else has an issue installing on a Seagate or other
                    drive with a GUID Partition Table (GPT), and has trouble. Trying to use
                    fdisk will fail; it cannot handle the GPT, and exits with the message to use
                    "parted" None of the other partition editors like Gparted or Qparted will
                    work either -- only "parted" Using "parted" it is possible to use the
                    "msdos" option to overwrite the GPT with a standard MBR. Then you can use
                    fdisk to partition your drive and debian should install fine. I was able to
                    get my Seagate FreeAgent 500 GB drive running with the nslu2 that way.

                    feffer

                    --
                    View this message in context: http://www.nabble.com/Moving-debian_slug-to-a-new-HD-tp21638450p21822901.html
                    Sent from the Nslu2 - Linux mailing list archive at Nabble.com.
                  Your message has been successfully submitted and would be delivered to recipients shortly.