I applied mkswap on root partition: help! - SOLVED

Donatas G. dgvirtual at akl.lt
Tue Dec 5 14:51:06 GMT 2006


OK, so here is the miracle: I took the computer to THE linux expert of 
lithuania, who took a live cd slax, boot it with option slaw noswap (so that 
it would not touch the swap partitions), then ran 

fsck.ext3 /dev/hda5 and corrected all the errors found.

Then the system booted and we could not detect any corruption. So my data, 
and - so far it seems so - the programs are saved. 

Now there is a serious problem in ubuntu  - or maybe mount command. Look at 
this:

root at bala:~# fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         243     1951866    b  W95 FAT32
/dev/hda2   *         244        1293     8434125    7  HPFS/NTFS
/dev/hda3            1294        9729    67762170    5  Extended
/dev/hda5            1294        3251    15727603+  83  Linux
/dev/hda6            3252        3382     1052226   82  Linux swap / Solaris
/dev/hda7            3383        9729    50982246    b  W95 FAT32

## here you can see that the swap partition is /dev/hda6 (correct) and the 
root partition is /dev/hda5 

And now the output of mount:

root at bala:~# mount
/dev/hda6 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.17-10-generic/volatile type tmpfs (rw)
/dev/hda1 on /media/hda1 type vfat (rw,iocharset=utf8,umask=000)
/dev/hda2 on /media/hda2 type ntfs (rw,nls=utf8,umask=0222)
/dev/hda7 on /media/hda7 type vfat (rw,iocharset=utf8,umask=000)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/hdb on /media/cdrom0 type iso9660 (rw,noexec,nosuid,nodev,user=dg)
/dev/sda1 on /media/usbdisk type vfat 
(rw,nosuid,nodev,quiet,shortname=mixed,uid=1000,gid=1000,umask=077,iocharset=utf8)

### so here the root partition is, suddenly, /dev/hda6 - which is INCORRECT!  

I will file a bug report regarding this problem.

Donatas

antradienis 05 gruodis 2006 10:29, Donatas G. rašė:
> > On 12/4/06, Donatas G. <dgvirtual at akl.lt> wrote:
> >> Today i did mkswap on my root partition
> >>
> >> mkswap /dev/hda5
>
> Lord Sauron wrote:
> > I don't know about recovery, but you'll need to reformat your drive to
> > begin using Linux again.  There are ways to recover data, assuming
> > that the swap partition was not written to.  However, I'm not familiar
> > with any recovery techniques, though I do know that most of them start
> > with a Live CD.
>
> Has anyone ever been in a situation like that and recovered any
> information from the hard disk?
>
> I do have some info that I do not have a backup of.... Would be very bad
> to loose it...
>
> Donatas

-- 
Donatas Glodenis
http://dg.lapas.info



More information about the kubuntu-users mailing list