Terminal commands: how to create a directory in ext2 partition on flash drive
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Terminal commands: how to create a directory in ext2 partition on flash drive
ISSUE RESOLVED-NO FURTHER HELP NEEDED
I am attempting to setup a bootable Backtrack USB flash drive following their instructions. I need to create a directory "changes" on the ext2 partition i've set up on my flash drive. The device is sdb
I have 2 partitions as required: /dev/sdb1 Fat16 and /dev/sdb2 ext2
I am totally stuck as i don't know the command to create a directory in /dev/sdb2. I've tried all sorts of things, no luck. I can't even figure out how to change the prompt from root, or home/system or whatever, to /dev/sdb2. Gparted doesn't allow this either.
I know i'm off track here, and would really appreciate some insight. It's not for a lack of trying...
Last edited by gordon__1; 01-14-2008 at 10:57 PM.
Reason: mark resolved
well you need to format the partition with an ext2 file system if you have not yet done so. just creating a partition does not make it usable, it must still be formatted.
mke2fs /dev/sdb2
then you need to mount the partition, in order to mount the partition you need a directory to mount it to ..
mkdir /media/usbext2
then mount ext2 partition on the USB drive to the directory you just created
mount /dev/sdb2 /media/usbext2
Change into the ext2 partition on the USB device..
you need to mount it first
su
type password here
mkdir /mnt/flashdrive
mount -t ext2 /dev/sdb1 /mnt/flashdrive
then cd to the directory
cd /mnt/flashdrive
then make the directory
mkdir changes
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.