Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
hello, i need help adding a partition of my hard drive to my linux (ubuntu) system.
i'm using only 2gigs for my whole ubuntu system (don't laugh i know its too damn small for a full distro, but i was just testing at first, didn't know i was gonna keep it) anyways, i also made a 3 gig partition that i thought i would use for suse but i never added it to my laptop. i would like to use the 3 gigs that i separated for suse for my ubuntu partition.
my xp partition has about 45 gigs, ubuntu about 2 and suse(actually blank partition) has 3 (unused) gigs.
i would like to know how to add the partition to ubuntu so i can use the 3gigs to save files and install programs because right now i only have about 300 megabytes of free space on the ubuntu partition.
i only use ubuntu for programming in c++, java, bash and perl so i won't need more than those 3 gigs i already partition, so don't recommend to make a bigger partition to install ubuntu.
How much space are you using for your /home directory. You might want to format the 3 gigs (now empty) and move your /home directory to this partition. Normally, /home and /usr are the largest and moving one of them to the 3 gig partition would free up space. (Reducing the XP partition size would free up even more space!)
Is the 3 gig (empty) partition currently mounted? You will want to copy (or move) your user home directory or directories to the new partition, before changing the /etc/fstab entry for /home. Perhaps you could mount it temporarily on /mnt.
Enter the single user mode as root before moving the home directory. That way you are not trying to move files which are still being used.
Installing non-Unbuntu applications from source can take up a lot of space, and the default location is usually /usr/local. If you move /home to the new partition as suggested you can also make a new directory /home/local, symlinked to /usr/local. That way all the non-Ubuntu stuff is together in the same partition. Easy to change distro without disturbing your own files.
the empty partition (3 gigs) is "formatted" for linux with partition magic. i could transfer all my stuff to this new partition and since i'm the only user i could send my entire home directory to the new partition but how would i do that. i'm not a pro, i just took an intro to unix class last semester and have been trying distros like crazy, but i've finally chosen ubuntu and found out 2 gigs is just not enough. if somebody could tell me how to format my empty partition (that is if partition magic's "linux format" is not adequate) so that i can just copy all my home directory stuff to it, i'd be able to store music along with my files.
another question and i know i should post a new thread but its related: which directory is the default where the new programs are installed, and i want to know if i can also transfer this directory to the new partition
oh. i forgot when you add a new partition or hard drive it becomes just "space" on the systems because its not divided into "drives" like in windows, so would i be able to just keep storing stuff in the same folder (without moving them) and let the system be in charge of using the empty space on the new partition?
and follow menus. To make an ext3 filesystem on a partition (could use another type if you want):
# mkfs.ext3 /dev/hda2
To mount new partition on directory /mnt
# mount /dev/hda2 /mnt
To copy home directory from old to new partition
# cp -a /home/my_home_directory /mnt
All these need to be done as root, and some are slightly dangerous in that they can destroy data. So best read up the man pages and make sure you understand what you are doing.
Where do new programs go? Ubuntu almost certainly puts its packages in /usr. If you install non-Ubuntu applications from source code the Makefile typically defaults to putting stuff in /usr/local (keeping them separate from 'official' packages).
Not sure I understand the last paragraph. On a unix system there is the root directory / and disk partitions are mounted on / and various subdirectories. Stuff in the subdirectory is physically stored in the corresponding partition.
i just formatted the partition with ext3 and i copied all the files from home to it, but i don't think that's right because what i want is to have the entire home location saved or mounted on the new partition everytime i turn on my laptop, and i also want it to be the place where i automatically go when i intend to go "home"
i made a new dir on / and named it new so its "/new" and the empty partition is on /dev/hda7 (3 gigs), i formatted with mkfs.et3 /dev/hda7
then i mounted it like this "mount /dev/hda7 /new", and then i copied the files from home to the new partition folder with "/cp -a /home/enrique /new"
what that did is just copy the files from my home directory to the new partition, but what i want is to keep using /home/enrique as my home but have that on the new partition "dev/hda7"
I'm not sure I followed you completely but I am going to post my fstab file. Maybe someone will come along that is not half asleep and see if this fits. Notice I have a seperate partition for my /home directory too, along with a few others.
and i'm on my xp partition now, reading the forums for help, you see i don't have the wireless card working on ubuntu, and i don't have the mp3 codecs for xmms aside from running out of space on my ubuntu partition, so right now i can't answer because i'm about to go to sleep too, lol, but tomorrow i'll let you know, i believe i have modified the fstab file by adding a line to the end like this
"/dev/hda7 /new ext3 options.can't.remember.lol 0 1"
but then i restarted into xp so i don't know if it worked, but still, i believe all that'll do is mount the new partition but it wont have my home directory mounted "on it" indefenitely
Best be in single user mode while mounting/unmounting your home directory.
Unmount /dev/hda7 and remount it on /home. Hopefully you will now have a /home/enrique again.
Note that the new partition will then be mounted 'on top of' the contents of your original home directory. The old stuff will still be there and will reappear if you unmount /dev/hda7 again.
You should then edit /etc/fstab to include a line to mount /dev/hda7 on /home automatically.
When you are happy with the situation, you can delete the contents of your old /home directory. Make sure it is really the old one, not the new one. You should go into single user mode, then unmount /dev/hda7 to see your old /home.
Confusing? Definitely. And you can screw things up if you are not careful. So please make sure you understand what is happening before you try this at /home
Last edited by maroonbaboon; 10-15-2005 at 02:47 AM.
i frigging got it to work with your help guys, when i mounted home on /dev/hda7 the frigging computer froze and i freaked out, lol, i couldn't do a thing, the console froze and the only thing i could do was move the mouse but even restart wouldn't work, i guess the system got confused because home was already mounted on /dev/hda5 along with the rest of ubuntu and then i mounted home on /dev/hda7, i suppose there must have been some conflict in the system, anyways i turned off the laptop and when i booted to linux i still had the console on startup (on the gui) but the background was white instead of orange, so i just closed it and ubuntu started up fine. it was weird, anyways, now i have 2.5 gigs on the home drive which is in hda7 and about 200 on hda6 which is where i have the rest of the system on, i suppose i can install new programs on the home drive right? or are the programs still gonna go into the /usr/local automatically (/usr/local is in the partition that has 200 megas left /dev/hda6).
anyways, thanks, next time i install a distro i'll have a partition specifically for the home, i've installed about 20 distros and i've always used one partiton, let this be a lesson, hahahaah.
ok, so the program is installed somewhere in my home directory, and how would i uninstall the program later on, i know that in windows when you install something, the wizard makes a folder containing about 99 percent of the program and then like about 1 percent is sent to other folders, for dependecies or something, is it the same with linux? i know with rpms its easy to uninstall and if i download programs from ubuntu i can use synaptic to uninstall them but how about binaries or source?
maybe i should make another thread, but you dudes seem to know what you are talking about
If you follow hanzerik's suggestion uninstallation is just a matter of nuking the directory 'rm -r ~/MyApp'. That's one advantage of giving each app its own directory. The disadvantage is that it is harder to use the PATH environment variable, as all your executable files are in different places. Some source code packages provide 'make uninstall'. But otherwise if you use the usual default --prefix=/usr/local when configuring it can be hard to recognise which files to remove.
One way to try to get the best of both worlds is to give each app its own directory, and put symlinks to the executable files in some directory in your PATH e.g. $HOME/bin or /usr/local/bin.