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.
I have an empty 10 GB drive that I would like to use to store my Linux backups. Gparted shows it as /dev/sdc--9.5 Gb-- unallocated But it is not seen by the system. What do i need to do so it is seen and so it can be used for backup storage?
You need to format the drive to a known filesystem (the most common is ext3) from within GParted. Then you just need to mount it (it should end up being /dev/sdc1 after it has been formatted).
You can use a root the fdisk tool to partition your disk or simply run '/bin/fdisk -l' to list your current device. You have to partition it even if you want it to be a single partition - it needs a partition table anyway.
After having created the partition run mkfs to add a file system to the partition. In actuality, mkfs is simply a front-end for the various file system builders (mkfs.ext3, etc) available under Linux.
When done, mount the device or even better, add it to your /etc/fstab file, so it gets mounted at boot time.
joe@joe-desktop:~$ sudo fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 * 1 4737 38049921 83 Linux
/dev/sda2 4738 4865 1028160 5 Extended
/dev/sda5 4738 4865 1028128+ 82 Linux swap
Device Boot Start End Blocks Id System
/dev/sdb1 1 1241 9968301 83 Linux
joe@joe-desktop:~$
Quote:
When done, mount the device or even better, add it to your /etc/fstab file, so it gets mounted at boot time.
OK, next lesson.... how do I do that?
Thanks again!
Last edited by joseph2020; 04-18-2009 at 01:31 AM.
Just open a terminal and enter
sudo gedit /etc/fstab
and add a line for the new partition that looks like the other ones. You can find the UUID of the partition by running the blkid command. And of course, you'll need to create a directory as a mount point where the new space will appear, say
mkdir $HOME/Backup (in which case you need to specify /home/user_name_here/Backup in fstab).
Once you are done, run
sudo mount -a
then you will probably still need to change the permissions:
sudo chown-R $USER:$USER Backup
It is simple than you think. Just create a directory. It is assumed that you created in your home directory. Lets say the name of the directory is backup.
Now edit the /etc/fstab file as a root user. Open it in your favorite text editor. I say you do it gedit. But not necessarily that and is just an example.
Just add the following lines there:
(this created a new folder under /media unto which you shall mount the partition)
NOW YOU CAN EDIT YOUR FSTAB AND USE THAT NEW FOLDER FOR MOUNTING:
sudo gedit /etc/fstab <Enter>
<enter password>
(graphic editor gedit opens, now you may enter or add the following line)
/dev/sdb1 /media/mybackpart ext3 defaults 0 0
(Now save and close the geditor. Be sure you saved it.)
When you reboot you can browse into your /media/mybackpart and there it is now mounted and ready to use.
This is only an illustration for the purpose. But for backup purposes you may mount it under /home directory if you like. Target folders for mounting can be created anywhere as long as you have permissions.
Read more about Linux tutorials available in the web. Use Google. There is also a help file for every command in the terminal, just enter:
man <command> <pressEnter>
For example you want to know more about 'mount' command, you'll type:
man mount <Enter>
(a manual page for command 'mount' will open)
a manual page will show up like help file for the requested command.
hope it helps.
goodluck.
Last edited by malekmustaq; 04-18-2009 at 04:52 AM.
I am very happy! The drive is now showing up in all applications. just finished doing a backup to that "other" drive. I just did what you said:
Code:
It is simple than you think. Just create a directory. It is assumed that you created in your home directory. Lets say the name of the directory is backup.
Now edit the /etc/fstab file as a root user. Open it in your favorite text editor. I say you do it gedit. But not necessarily that and is just an example.
Just add the following lines there:
Code:
/dev/sdb1 /home/user_name/backup ext3 defaults 0 0
Thank you very much for your helpful suggestions!
thorkelljarl:
Thank you for the links, I will be studying those very soon. There's so much to learn, and it's frustrating as I consider myself an advanced WinXP user, and now it seems I don't know how to do anything, even the most basic tasks. But, it is definitely getting better, and I am sure in a short time I will be as comfortable with Linux as I was with WinXP.
I just need to say that the linuxquestions.org users are the most helpful I have ever seen. I love this place!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.