Partitioning
HI,
I tried changing an existing dos partition into a ext2 one using mkfs.ext2
and mk2efs.
# mkfs.ext2 /dev/hda7 But the partition type is still FAT 32 when I use fdisk(in Linux). I am not able to mount it as a FAT partition though. If I delete the partition then my partition numbers get changed i.e. If I am delete /dev/hda7 -- FAT 32 (mentioned above) then the following happens /dev/hda8 -----> /dev/hda9 (Linux swap) /dev/hda9 -----> /dev/hda8 (ext2)
The /dev/hda9 partition houses LInux. If the partition number changes then I may need to run LILO again. But is there no other way out to convert the existing FAT partition to an ext2 partition.
Signature · 6 lines
Natarajan - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 5 lines · Natarajan K
HI,
I tried changing an existing dos partition into a ext2 one using
mkfs.ext2
and mk2efs.# mkfs.ext2 /dev/hda7
You do this and it does not return an error?
Quoted 2 lines
But the partition type is still FAT 32 when I use fdisk(in Linux). I am not able to mount it as a FAT partition though.
Right. That's because you have a mess, not a working partition/filesystem combination. You need to change the partition type in fdisk, using the "t" command.
Only after you have changed the partition type to "Linux" (0x83) should you try to create a filesystem using mke2fs or mkfs.ext2 .
Quoted 8 lines
If I delete the partition then my
partition numbers get changed i.e.
If I am delete/dev/hda7-- FAT 32 (mentioned above) then the following happens/dev/hda8----->/dev/hda9(Linux swap)/dev/hda9----->/dev/hda8(ext2)The
/dev/hda9partition houses LInux.
I don't understand this part. If the swap partition became hda7, I would have a *guess* about what is going on (basically, that logical partitions need to be numbered in order, so deleting one causes the others to move up ... I haven't actually seen this behavior, but I doubt I've ever actually tried anything that would cause it). But I can't think of a reason why the deletion would cause two other partitions to *exchange* their listings in the partition table.
Quoted 3 lines
If the partition number changes then I
may need to run LILO again. But is there no other way out to convert the existing FAT partition to an ext2 partition.
There is, and I described it above. Recaping, you need to do it in two steps:
1. Use fdisk to change the partition type to Linux (0x83).
2. Use mke2fs to create an ext2 filesystem in the partition.
--
-------------------------------------------"Never tell me the odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]
-------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Hi.
Quoted 7 lines
I tried changing an existing dos partition into a ext2 one using mkfs.ext2 and mk2efs.
Quoted 1 line
# mkfs.ext2 /dev/hda7But the partition type is still FAT32 when I use fdisk (in Linux). I am not able to mount it as a FAT partition though.
Actually, the "Windows partition type" is still FAT32 as that's what is stored in the partition table. You correct this by using the 't' command within Linux fdisk and setting the relevant partition's value to 83.
Quoted 8 lines
If I delete the partition then my partition numbers get changed i.e. If I am delete
/dev/hda7-- FAT 32 (mentioned above) then the following happens
/dev/hda8----->/dev/hda9(Linux swap)/dev/hda9----->/dev/hda8(ext2)The
/dev/hda9partition houses LInux.
This happens because you are dealing with what Windows calls "Logical partitions", and those can only be safely deleted from the end.
Quoted 1 line
If the partition number changes then I may need to run LILO again.
As it happens, you won't need to rerun lilo but you WILL need to tweak various Linux configuration files to adjust which partitions are mounted or exported where, so I would suggest you don't do this.
Quoted 2 lines
But is there no other way out to convert the existing FAT partition to an ext2 partition.
See above.
Best wishes from Riley.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 5 lines · Natarajan K
I tried changing an existing dos partition into a ext2 one using
mkfs.ext2 and mk2efs.# mkfs.ext2 /dev/hda7 But the partition type is still FAT 32 when I use fdisk(in Linux). I am not able to mount it as a FAT partition though. If I delete the partition then my
[tale of woe deleted]
perhaps, an analogy might help understand what is going on. think of your hard disk as a book; the partition table is like the table of contents of the book (only contains information about what is where and such stuff) and the file system describes the format in which the the information in each chapter itself is organized. of course, your data itself is like the actual text matter of the book. using fdisk (or disk druid or some other such tool) will manipulate the partition table and not touch the file system that actually resides on the disk. using mkfs or dos/win 'format' command creates the file system (the way in which the actual data itself is organized) and will not touch the table of contents er. i mean, partition table.
as for whether change of partition numbers needs lilo to be run, it depends. recent linux versions use partition labels to mount partitions - look in what what /etc/fstab has; if the first column is label=blah, then you have this later style. if the first column is /dev/blah, then you have the older style. in the old style, yes, you have to edit fstab accordingly, but may not need to run lilo unless your / or /boot partition has changed number. if you have the newer label=blah style, only if /boot changes (or /, if /boot is not a separate partition but resides within /) do you have to run lilo after making the change in lilo.conf. if your partitions dont have lebels, you can use e2label command to create (or even read) the labels. grub makes it easier to handle such situations. with lilo, if there is a mistake in lilo.conf, you are in trouble. with grub, you can edit the grub.conf at boot time and get into the system.
sriram
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs