Mount/fstab Question . . .


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mount/fstab Question . . .
# 1  
Old 11-17-2014
Mount/fstab Question . . .

Greetings!

Got another basic question for the community Smilie

After wiping a drive with dd, and calling mkfs.ext4 to set things up again, fstab seems to need to be refreshed somehow to allow a call to mount for the volume.

What might the "secret handshake" be to pull this off without first pulling the drive out???

Thanks --
# 2  
Old 11-17-2014
Yes, you will have to edit /etc/fstab to add or change the entry for your new filesystem. Are you getting an error when you try:
Code:
mount -t ext4 /dev/something /mnt

This User Gave Thanks to derekludwig For This Post:
# 3  
Old 11-18-2014
You do need to explicitly remount the file system with a proper mount command. It won't magically remount itself.

mount(8): mount filesystem - Linux man page
# 4  
Old 11-18-2014
@derekludwig:

You got me moving in the right direction.

In the end,
Code:
mount -t ext4 /dev/sdb1 /mnt/usb

turned the nut on my end Smilie

Comically, I tried
Code:
mount -t ext4 /dev/sdb1 /dev

and watched all of the unmounted filesystems completely disappear (even GParted and TestDisk protested)! Rudely killed everything and rebooted to Parted Magic; only to see that all was still there, and happy as normal...

Any comments/insights on what might've happened?

Thanks again --
# 5  
Old 11-18-2014
Hi,

Mounting a file system on a directory causes all below the directory to vanish until the file system is unmounted - not that easy when you have no device tree (/dev)

Regards

Dave
This User Gave Thanks to gull04 For This Post:
# 6  
Old 11-18-2014
Quote:
Originally Posted by LinQ
Comically, I tried
Code:
mount -t ext4 /dev/sdb1 /dev

and watched all of the unmounted filesystems completely disappear
That is pretty funny Smilie

/dev/ is folder where device files are kept -- the files UNIX/Linux need to access, among other things, disks. You opened your new partition overtop of that, blocking them all. (Kind of like setting a blank sheet of paper atop a written one; the stuff beneath still exists, but you don't see it.) Things already open won't be affected, but you won't be able to open anything else. This has wider effects than disks. You probably lost the ability to create new terminals too, as well as sound, mice, even the bit-bucket, anything which is a character or block device.

You might have been able to recover from that with umount /dev but a reboot is good too.
This User Gave Thanks to Corona688 For This Post:
# 7  
Old 11-18-2014
@gull04 and Corona688:

Thanks for the insight.

That was one heck of a prank if you ask me Smilie

Cheers!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Mount Linux filesystem not defined in etc/fstab

Hello, is there a way to mount a filesystem which is not defined in the etc/fstab ? Could someone share me any code or command (3 Replies)
Discussion started by: srilaxman
3 Replies

2. UNIX for Dummies Questions & Answers

/etc/fstab mount issue

I have a virtual machine with Redhat installed . I am trying to link CD/DVD Drive 1 to /media/cdrom1 and CD/DVD Drive 0 to /media/cdrom0 I tried making these changed in /etc/fstab by adding the below line to it /dev/sr0 /media/cdrom0 iso9660 user,noauto,exec,utf8 0 0... (2 Replies)
Discussion started by: walterthered
2 Replies

3. Red Hat

Mount /etc/fstab

Can you please help me mount below filesystem in fstab ( I have rhel 5 ) as the line is long - it is not taking as single line How can break this in 2 line and act as one ....please help ... (4 Replies)
Discussion started by: saurabh84g
4 Replies

4. Ubuntu

fstab question

I have created a thumbdrive with a bootable version of Ubuntu 10.04 LTS, it uses Grub legacy. One of the issues I have is that everytime I boot a new system from the thumbdrive, it writes entries for the partitions in the fstab. Consequently, when I boot another system, the OS reads the fstab... (2 Replies)
Discussion started by: stumpyuk
2 Replies

5. UNIX for Dummies Questions & Answers

fstab

hi , i'm creating a shell script using fstab for my project of last year, i wonder you can help me to know what is the command allow me to get the list of unmounted partitions. thanks (4 Replies)
Discussion started by: Linux001
4 Replies

6. Shell Programming and Scripting

mount question

Is it users or user? mount /dev/sda5 /media/sda5 vfat rw,user,umask=0002 0 0 Or mount /dev/sda5 /media/sda5 vfat rw,users,umask=0002 0 0 (3 Replies)
Discussion started by: cola
3 Replies

7. Programming

A question about the system call mount in a C program

Dear all, Currently I'm working on a C program (OS = ubuntu 9.0.4)in which a USB key will be mounted and umounted for several times. I read the man page of the mount system call. I use the following test code #include <sys/mount.h> int main(int argc, char *argv) { if... (5 Replies)
Discussion started by: dariyoosh
5 Replies

8. UNIX for Dummies Questions & Answers

fstab question

Folks; Please be patient with this issue when you read it. I know it's a little tricky. I have a new share created on my SUSE 10 box. I'm trying to edit the /etc/fstab file or find a way to make this share needs no authentication. The reason for that is we're using an outside application to... (3 Replies)
Discussion started by: Katkota
3 Replies

9. UNIX for Dummies Questions & Answers

question on change of mount point

Hello Folks, had a basic question mount point and renaming it. on AIX 5.3 box, I have a filesystem Filesystem GB blocks Free %Used Mounted on /dev/issclv01 1.00 0.50 50% /issc/doc Now instead of /issc/doc, i want to rename it to /issc is it as... (2 Replies)
Discussion started by: karthikosu
2 Replies

10. UNIX for Dummies Questions & Answers

Basic question for making remote mount points

I'm on SunOS 5.8. I'm not sure of the exact terminology, but I want to make a "remote mount" from my server to another server. (Basically I want to create one of the mount points on my server be a shared volume that's on another server here). So if I do a df -k, I want to see all of the volumes... (1 Reply)
Discussion started by: FredSmith
1 Replies
Login or Register to Ask a Question