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

Re: OpenSLug: Increasing Root partition

Expand Messages
  • ced23456
    ... Hi Mike, Thanks for the explanation. I read them one month ago but i had to find some spare time to do the size increase. Just to mention that cp -a is
    Message 1 of 3 , Apr 10, 2009
      --- In nslu2-linux@yahoogroups.com, "Mike (mwester)" <mwester@...> wrote:
      > ced23456 wrote:
      > > ... i would
      > > like to move this root partition and the swap to antother flashstick
      > > of 4GB.
      > >
      > > My approach would be to rsync the root partition to the new flashstick
      > > then replacing the current flashstick (512MB) to the new one.
      > >
      > > Will this work or do i need to use the command turnup.
      > No, this won't work -- even though it will appear to work. SlugOS
      > mounts the root partition by the UUID, which will not be the same for
      > the new partition. When that fails, it will fall back to whatever the
      > /dev/sd<letter><partion-number> was when the turnup was originally done
      > -- which might actually work, at least until some random time in the
      > future (because which device is assigned to a USB storage device is
      > dependent upon time, not port number or other fixed things).
      > But all is not lost, this was an anticipated use-case. Just running
      > "turnup memstick /dev/sd<whatever>", without the "-i" option, will cause
      > SlugOS to turnup to the new device without actually altering its contents.
      > Here's the correct sequence to do what you want to do (and no, don't use
      > rsync!):
      > While running on the existing memstick, execute the "turnup flash"
      > command and reboot. It will boot up from internal flash, which will
      > give you full access to the old rootfs.
      > Plug in your new memstick, partition and format it as ext3 in the normal
      > fashion. Mount it to /mnt.
      > Plug in the old memstick, it should be automatically mounted in /media
      > -- make sure that this happened.
      > Confirm that you can see the old memstick in /media, and the new one in
      > /mnt.
      > Confirm again with "df" that the old and new ones are as you expect.
      > Check once again, because if you have them backwards, or not mounted as
      > expected, Very Bad things can happen to your data.
      > Now that you're sure, use find and cpio to copy the data from
      > /media/<whatever-it-is> to /mnt. You can't use rsync, because its not
      > available from the flash filesystem. The tar utility might work as
      > well. It's rather doubtful that "cp -R" will work, because (once again)
      > you're on the flash filesystem, and all you have to work with is what's
      > provided there -- mostly busybox, and not the full utilities. (Note
      > that if you prefer, you can do the copy from the old to the new memstick
      > on any Linux system -- just make sure that the copy operation preserves
      > ownership, timestamps, and understands special files such as device
      > nodes, etc.)
      > Unmount the two flash devices, remove them, and plug the new one back
      > in. It should be automatically mounted in /media/<something-or-other>.
      > Confirm that it looks complete (df is a good start to see that it's
      > about the same amount of data as the old one). Especially check to make
      > sure that the dev directory contains device nodes, not files.
      > When you feel it's all ok, then record the
      > /dev/sd<letter><partition-number> it was given, and issue the "turnup
      > memstick /dev/sd<letter><partition-number>" command.
      > Reboot, and confirm that the new rootfs is being used.
      > -Mike (mwester)

      Hi Mike,

      Thanks for the explanation. I read them one month ago but i had to find some spare time to do the size increase.

      Just to mention that "cp -a" is working so no need to use cpio.

      I've formatted/partioned the new usb key whith the slug so when you 'turnup flash' and reboot, it recognises all usb key and mount them under media. No need to mount the new usb under '/mnt'.

      Thanks again for your procedure.

    Your message has been successfully submitted and would be delivered to recipients shortly.