LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Formating a FAT32 partition, putting the partition correctly into FSTAB, and more. (https://www.linuxquestions.org/questions/linux-general-1/formating-a-fat32-partition-putting-the-partition-correctly-into-fstab-and-more-109295/)

squall14716 10-27-2003 08:25 PM

Formating a FAT32 partition, putting the partition correctly into FSTAB, and more.
 
First question: In fdisk during the Knoppix harddrive install, I marked my 4th partition (hda7) as a FAT32 partition. How do I format it and use that partition.
Second question: Once I do that, how do I set it up correctly in /etc/fstab so I can mount it?
Third question: Once I mount the partition, how can I move /home and /usr to that partition?

That's all for now.

EDIT: Oh yeah, I forgot a question. Since I am using the boot manager (LILO I think) that Knoppix installed, how can I change the what names appear for each operating system when I get the screen to choose an OS when I am booting my PC?

quatsch 10-27-2003 08:34 PM

I don't think you want /home or /usr on an fat32 partition. For one, it doesn't support symlinks and I'm sure this'll cause trouble for /usr and probably also for /home.

As for formatting, you can use the command fdisk, or
cfdisk
for easier use (I'm pretty sure you have cfdisk).

fstab. Something like this:
/dev/hda7 /{mountpoint} vfat auto,rw,umask=0 0 0
should do it.

squall14716 10-27-2003 08:55 PM

When mounting it, I get this error:
Code:

Could not mount device.
The reported error was:
mount: wrong fs type, bad option, bad superblock on /dev/hda7,
or too many mounted file systems

I have /mnt/hda1, /mnt/hda5, and /mnt/auto/cdrom1 mounted, but that's about all, so it shouldn't be too many. I can change the filesystem type in cfdisk, but that still doesn't make it usable, does it? I need to make it FAT32 and usable.

quatsch 10-27-2003 09:04 PM

what's the exact command you used?

For formatting. my guess is that you still have windows installed on your machine (/dev/hda1??). So the easiest thing to do might be from inside windows. If it's XP, right click on my computer, then management -> disk management and then have it formatted in fat32.

squall14716 10-27-2003 09:07 PM

I have Windows 2k in /mnt/hda1, and last time I blindly formatted one of the drives, Knoppix stopped working and I had to re-install it. I just right click and selected "Mount" on the icon I created for the drive on my desktop, and it gave me that error.

quatsch 10-27-2003 09:15 PM

try to do it from a terminal window as root:
mount -t vfat /dev/hda7 /mnt/{mountpoint}

Also, it should be okay formatting from inside windows so long as you don't format the wrong partition - i've done such things a few times with several distros and haven't had problems. hda7 is the third one in the extended partittion.

squall14716 10-27-2003 09:22 PM

I have 4 partitions and Windows only sees 3, I formatted the last one (E:) and I no longer got the dual-boot option - it just went straight into Windows 2k, I guess I formatted the Knoppix one.

(For clarity, hda1 is Win 2k (NTFS), hda5 is Knoppix (ext2), hda6 is Linux swap, hda7 is for my data, and should be FAT32, since both Linux and Windows can read it.)

Ok, I ran that from the terminal and I got the same error:
Code:

root@linknopersocom:~# mount -t vfat /dev/hda7 /mnt/hda7
mount: wrong fs type, bad option, bad superblock on /dev/hda7,
      or too many mounted file systems


quatsch 10-27-2003 09:26 PM

windows see only three??? I guess it's better than it claiming that your drive is corrupted or somethin...

What's the output you get from
fdisk -l /dev/hda
(do this as root). This will give you the list of partitions and the file system types it sees.

squall14716 10-27-2003 09:28 PM

Code:

root@linknopersocom:~# fdisk -l /dev/hda

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot    Start      End    Blocks  Id  System
/dev/hda1  *        1      131  1052226    7  HPFS/NTFS
/dev/hda2          132      4864  38017822+  f  Win95 Ext'd (LBA)
/dev/hda5          132      450  2562336  83  Linux
/dev/hda6          451      581  1052226  82  Linux swap
/dev/hda7          582      4864  34403166    b  Win95 FAT32


quatsch 10-27-2003 09:37 PM

hmmm. It says your /dev/hda7 is fat32. but the size of it bothers me a bit. I think there is a 32GB size limit for fat32 and yours might be slightly above it - I also now see why you want to migrate /home and /usr. Maybe try breaking that up into two; one smaller linux so you can migrate /home to it and then another in fat32.

squall14716 10-27-2003 09:41 PM

I'm not good in Linux, the only way I got those partitions was with the Win 2k install and I changed their filesystems with cfdisk. Are there any resources that you know of to help me split the partition into two?

quatsch 10-27-2003 09:52 PM

doesn't the menu system of cfdisk allow you to first delete the partition and then create new ones onto the empty space? cfdisk is the easiest one I know of for linux except for tools that come with mandrake.

squall14716 10-27-2003 10:06 PM

Oh, I didn't notice that I could create it in the free space. Thanks for your help. Can you also answer the question I edited in the first post a while ago if you know it? Thanks again. :)

EDIT: How can I create a new Lunux ext2 partition?

Skyline 10-27-2003 10:12 PM

Change the label names in lilo.conf - make sure you change the default = line aswell if you change the corresponding label name - also run

/sbin/lilo

after youve made the changes.

quatsch 10-27-2003 10:16 PM

for lilo. What you do is edit /etc/lilo.conf

you will see the entries, called stanzas, for each os installed. Each stanza will have a line like:
label=Knoppix
or
label=DOS

These are the names that appear in the lilo menu. You can change them any way except that you cannot have Spaces in the names. Also, when you change the name, make sure you edit the entry
default=
appropriately. You've got to provide the label of the OS you want to start as default. The entry is somwhere near the top of the file. While you're editing it, you should get rid of all the lines with # at the beginning (kind of useful comments but just annoying when editing it - you could backup the file somewhere for reference if you want to).
After editing lilo.conf, you must run lilo so that the changes take effect:
/sbin/lilo -v

You will see some output about what it is doing and error messages in case something goes wrong. This whole thing has to be done as root.


All times are GMT -5. The time now is 12:51 AM.