fdisk / mount / format / help!
The Situation:
I'm trying to format a flashdrive so I can set up a certain linux distro (backtrack4beta) to boot from the drive with persistent changes. The Method: 1. The method I've been using involves first formating the drive then making the 1st partition (the boot partition) be fat32 which will house the ISO and also making a 2nd partition which will house all of the changes. 2. Then I will use Unetbootin to install the my ISO. 3. Then I will make changes necessary in the syslinux.cfg file to enable persistent changes. The Problem: The problem is I've yet to make it past step 1 of the method. I've done this in the past but I can't seem to get it to work on this new USB flashdrive. Here's what I've done: I've went through the process with fdisk you know n, p, filled in all the right sizes and I got this as a result: Code:
Disk /dev/sdb: 120.0 GB, 120034123776 bytes But the when I try to unplug and plug it back in, the flash doesn't seem to want to mount like it should. and I've tried using the mount command but this is all i get. Code:
root@ubuntu:/home/cynicalpsycho# mount /mnt/sdb However when I boot up my other flashdrive that i've already installed backtrack to (using THIS method)... both of the partitions pop right up... does anyone have any idea where my problem is here? |
The problem is that because you don't have fstab entries for your partitions, mount doesn't know where to mount them, or what filesystem types they have. So, you can specify these things on the command line, with e.g.
mount -t vfat /dev/sdb1 /mnt/tmp which will mount /dev/sdb1 (with filesystem type vfat, i.e. FAT32) on /mnt/tmp. Read the man page for mount for more info about the available options. |
Quote:
Code:
root@ubuntu:/mnt# mount -t vfat /dev/sdb1 /mnt/tmp And besides "you don't have fstab entries" that makes no since, because if that were the case, why am i able to load my other flash drives that use that same entry sdb (when plugged in first)? |
If I am not mistaken, you create the 1-Gib boot partition with FAT32 on missing directory.
The problem perhaps you have not created (mkdir) /mnt/tmp. You can check it by 'ls /mnt/tmp'. |
Quote:
no... if that were the case I would have gotten the error i get in this example: Code:
root@ubuntu:/home/cynicalpsycho# mount -t vfat /dev/sdb1 /mnt/dofus |
Quote:
one you have filesystems then you should be able to mount. |
Quote:
Code:
Disk /dev/sdb: 120.0 GB, 120034123776 bytes |
Both Nylex and valencequark are correct.
valencequark is correct in that you need to mkfs.vfat on your sdb1, and mke2fs on your sdb2 (mke2fs for ext2 or mkfs.ext3 for ext3). fdisk simply manipulates the partition table, ie. says where each partition starts, ends, and what type it is. Then you need to format a filesystem on each partition (unless there is already one sitting there coincidentally from a prior use of the usb drive - but I would never rely on that). Nylex is correct in that you need to specify type, device, and mountpoint if there is no matching entry in fstab. But there needs to be a valid filesystem there that can be mounted. (If you have an automounter service running, it will mount filesystems for you, but if there are no valid filesystems on the device, it will take no action.) |
Quote:
Fdisk just sets up your partitions...the "t" option just "labels" the partition...it doesn't format it. You still need to format...something like this... Code:
root@host# mkfs.vfat /dev/sdb1 |
I don't really like fdisk, use cfdisk if you have it, the layout is more intuitive.
|
Quote:
|
quick question...
does anyone know if gparted would do the same thing as me using:mkfs.vfat /dev/sdb1? |
nvm it does, and thanks people for clarifying my misconceptions! :D
My apologies if I seemed assholish... it's just who i am :P |
Quote:
|
All times are GMT -5. The time now is 05:53 AM. |