Re: move / to a new hard-drive



SOLUTION: I finally figured it out myself. I'm posting this in case it
helps someone else. Before trying this, make sure you have a boot-disk
and test you can get into rescue mode in case it all goes pear-shaped.

I tar-ed up the entire file structure of my existing / directory
(except for /boot, which is to remail unaltered, since it mounts on
/dev/hda1 already). Then:
#cd /
#mkdir new_root
#mount /dev/hda3 new_root
#mv *.tar new_root
#cd new_root

Untar all the tarballs here using tar xf <name of tarball>

Now I have a complete copy of my root directory structure on the new
partition.

#rm -f *.tar (tarballs are no longer needed)
#cd /
#umount new_root (directory no longer needed)

Now I can try to point the grub loader to the new location. RedHat 9
supports LABELS to refer to file-systems. File /etc/grub/grub.conf
refers to the location of the root directory by the Label "/". I used
the e2label command as follows:

#e2label /dev/hdc1 old_root (re-labels file-system of existing "/"
label to free the label)
#e2label /dev/hda3 / (gives the new pertition the "/" label)

reboot the system. It worked for me.

.



Relevant Pages

  • Re: Getting volume information
    ... label: APPS ... Root Directory: C:\ ... I copied your code into a console app and it runs fine for me. ... drives really don't have a label? ...
    (microsoft.public.dotnet.languages.csharp)
  • How would you...
    ... I have a two problems in my daily life with VSS that I feel rather hard to overcome. ... When we finish a release I'd like to set a label with a version number on the project *and all it's dependencies* so I can later easily retrieve all the files that were used to build a certain release. ... How would you do this if SomeHugeApplication depends on SomeLibrary1? ... I'd also rather not want to label the root directory, as that would label all the 100+ tiny projects too. ...
    (microsoft.public.vstudio.sourcesafe)
  • Re: [PATCH take 3][RFC] fat: Save FAT root directory timestamps to volume label
    ... the FAT root directory timestamps as the timestamps of the FAT volume label ... if a volume label entry exists. ...
    (Linux-Kernel)
  • Re: [PATCH take 3][RFC] fat: Save FAT root directory timestamps to volume label
    ... the FAT root directory timestamps as the timestamps of the FAT volume label ... if a volume label entry exists. ...
    (Linux-Kernel)
  • Re: redirecting files from tar -xvf
    ... >like to be able to restore them someplace else. ... I think that counts as a trivial modification. ... This will take files from wherever tar is run (e.g. root directory) ...
    (comp.unix.admin)