Re: problem while creating new partition



On Mar 26, 3:59 am, David Bolt <blacklist...@xxxxxxxxxx> wrote:
On Sun, 25 Mar 2007, mmccaws2 <mmcc...@xxxxxxxxxxx> wrote:-
On the 140gb hard drive I had the first 40Gb setup for linux. Never
formatted the latter. So I had used Yast to format it and assigned /
home to it thinking it would expand home.

How do I recover the original files and directories lost, without
further screwing up things?

First step is to ensure that all users are logged off, log in as root,
and then to switch to run-level 1 using "init 1". This ensures that
there should be no other users able to log in, and all the files in use
by any other user should be closed.

The next few steps are based upon /home _not_ being on its own
partition, which is something I wouldn't expect with 10.1+ and more than
10GB of free drive space.

Step two, use the "umount /home" command to unmount /home.

Step three, rename /home to something like /old.home and then create a
new /home. The command "mv /home /old.home ; mkdir -p /home" will do
that /mnt.

Step four, use "mount /home" to re-mount the partition /home.

Step five, go to step seven below.

==========

Now, these are for when /home is on a different partition to /

Step two, create the mount point /old.home as a temporary mount point
for the old /home partition using "mkdir -p /old.home"

Step three, use "fdisk -l" to get a list of the partitions, and "df" to
get a list of mounted partitions.

Step four, compare the outputs from fdisk and df to find any partitions
with a type "83" that aren't mounted.

Repeat the next two steps for each partition that isn't mounted but is a
Linux partition (type 83):

Step five, mount the partition on /old.home and then use "ls /old.home"
to find out if it contains the old /home.

Step six, if the partition _isn't_ the old /home, use "umount /old.home"
to unmount the partition, and repeat step five with the next unmounted
partition.

==========

Step seven, now you can go back to either run-level 3 (text console) or
run-level 5 (GUI) by using either "init 3" or "init 5"

Step eight, copy the files from /old.home into /home. You may need to
watch out for files that have been created in the new /home that also
exist in /old.home, e.g. mailbox files.

One thing to note is that if the old home wasn't a separate partition,
/old.home will contain any files and directories that you didn't move
before the reboot.

However, if you had to mount the old home, on the next reboot that
partition won't be re-mounted and so /old.home will be empty. Any files
or directories that you didn't move before the reboot are still there,
you just need to mount the partition to get at them.

Regards,
David Bolt

--
Member of Team Acorn checking nodes at 50 Mnodes/s:http://www.distributed.net/
RISCOS 3.11 | SUSE 10.0 32bit | SUSE 10.1 32bit | openSUSE 10.2 32bit
RISCOS 3.6 | SUSE 10.0 64bit | SUSE 10.1 64bit | openSUSE 10.2 64bit
TOS 4.02 | SUSE 9.3 32bit | | openSUSE 10.3a1 32bit

Well, it didn't quite work.

here is my df and fdisk output. I forgot how to use tee to capture my
whole process so I just directed the output to a file.

here is what my directory properties look like at root
drwxr-xr-x 2 root root 4096 Mar 31 07:08 old.home

but I could not mount old.home

error message
comlnx:/ # mount /old.home
mount: can't find /old.home in /etc/fstab or /etc/mtab
comlnx:/ #

so please suggest what I'm doing incorrectly.

Thanks


I

Filesystem Size Used Avail Use% Mounted on
/dev/sdb5 39G 36G 653M 99% /
udev 1007M 124K 1007M 1% /dev
/dev/sda1 79G 39G 40G 50% /windows/C
/dev/sdb1 108G 23G 80G 22% /home
/dev/sda5 40G 27M 40G 1% /windows/E
/dev/sda6 32G 944K 32G 1% /windows/F

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 10199 81923436 17 Hidden HPFS/
NTFS
/dev/sda2 10200 19457 74364885 f W95 Ext'd
(LBA)
/dev/sda5 10200 15299 40965718+ b W95 FAT32
/dev/sda6 15300 19457 33399103+ b W95 FAT32

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 5196 19457 114559483+ 83 Linux
/dev/sdb2 129 5195 40700677+ f W95 Ext'd
(LBA)
/dev/sdb3 1 128 1028128+ 82 Linux swap /
Solaris
/dev/sdb5 129 5195 40700646 83 Linux

Partition table entries are not in disk order

.



Relevant Pages

  • Re: Panasonic HD Recorders - What disk format?
    ... The earlier part of this is more about what may be Linux partitioning, ... might be possible to present the recorder with a larger disk already ... Most DOS/Windows utilities such as FDisk, Ghost, and Partition Magic Pro ... prompts to format it. ...
    (alt.os.linux)
  • Re: Cant find Hard disk
    ... Computer> Manage> Computer Management> Disk Management. ... Now you must partition and format your new drive. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Formatting C
    ... would format my C drive after saving most of my data. ... If you want to erase the disk, you can use some other stand-alone tools ... But if the thing you're attempting to format, is the partition ... Also, just for fun, you can use an offline scanning tool, to avoid ...
    (microsoft.public.windowsxp.general)
  • Re: setting up a new hard drive as drive D
    ... I want to add a second hard disk as IDE drive D but I cannot see any ... You will partition & format your second HD using XP's Disk Management ... move the problem HD to another IDE connector. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Help Failing Disk Problem
    ... and the FreeBSD OS on a hard disk that is failing. ... Either use sysinstall to slice and partition ... fdisk, bsdlabel and newfs. ... 512 MB I mount as /tmp ...
    (freebsd-questions)