You are not logged in.

#1 2008-07-01 00:39:28

smcsw2000
Member
Registered: 2007-06-22
Posts: 130

changing fstype (solved)

Is there a way to change the fstype of a partition without using the boot disk or fdisk for the whole drive? I put in a second hard drive and checked it with the installation disk and it seemed fine. Then I used the information to write to fstab:
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0


/dev/sr0 /mnt/cdrom   iso9660   ro,user,noauto,unhide   0      0
/dev/dvd /mnt/dvd   udf   ro,user,noauto,unhide   0      0
/dev/sdb1 /boot ext2 defaults 0 1
/dev/sdb2 swap swap defaults 0 0
/dev/sdb3 / ext3 defaults 0 1
/dev/sdb4 /home ext3 defaults 0 1
/dev/sda1 /home/svr ext2 defaults 0 1
/dev/sda2 /home/group linux defaults 0 1
/dev/sda3 /backup linux defaults 0 1
/dev/sdc1 /mnt/usb auto noauto,users 0 0
/dev/sdd1 /mnt/usb auto noauto,users 0 0
but when I reboot I get that sda3 and sda2 linux partitions are not recognized. I checked with df and get:
df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdb3             10080520   5518044   4050408  58% /
none                   1037776         0   1037776   0% /dev/shm
/dev/sdb1              1011956     10328    950224   2% /boot
/dev/sdb4            141730448  16016956 118513964  12% /home
/dev/sda1             20161204     47748  19089316   1% /home/svr
So I guess I have to change the fstype from linux to ext2, or ext3 but cannot find a way to do that without reformatting the drive Is there a way or do I have to reformat?

Last edited by smcsw2000 (2008-07-02 00:38:23)

Offline

#2 2008-07-01 01:09:31

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: changing fstype (solved)

Err, just put "ext2" or "ext3" instead of "linux" in /etc/fstab, depending on the FS that you have there. "linux" is not a valid FS.

-edit-

To make it clearer: it doesn't matter what FS type you set in fdisk; the FS gets created when you run mkfs.FSNAME and it's the FSNAME that you should put in fstab.

Last edited by lucke (2008-07-01 01:19:49)

Offline

#3 2008-07-02 00:37:57

smcsw2000
Member
Registered: 2007-06-22
Posts: 130

Re: changing fstype (solved)

thanks. Found mkfs command and researched, finally in terminal I ran mkfs.ext3 /dev/sda2 and then went to fstab and changed the extension from linux to ext3, rebooted and now I have the partition recognized and open for use.

Offline

Board footer

Powered by FluxBB