LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 03-17-2008, 02:16 PM   #16
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 46

Quote:
Originally Posted by Steve W View Post
Yep, you were spot on. Changed that one letter from "h" to "s" in fstab and it worked first time. I'm not sure why this Ubuntu distro is using sda instead of hda (I got the distro off a magazine coverdisk - it has loads of extra stuff loaded onto the standard Ubuntu distro, but obviously the people compiling the disk could put anything they wanted into fstab); from my limited experience of Linux, I always thought internal hard drives were called hd[something] and memory sticks and USB hard drives were called sd[something]. Ah, well.

The only minor problem I have now, is how to delete the unwanted /home on the root directory. When I click on /home now, it goes to the new /home on sda2. How can I reference the old /home on sda6 in order to delete it?

(PS. do I actually go and delete root/home? Someone said earlier I should leave it there as a "mount point"...)

Steve
Since your partition is now mounted at /home, you probably don't want to delete it.
 
Old 03-17-2008, 07:55 PM   #17
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
It's taken me quite a while to write this, checking as I go along. Please read it all before you start, and make sure you understand the principles (otherwise you'll never learn ) but I hope this is a reasonable guide:

Quote:
I'm not sure why this Ubuntu distro is using sda instead of hda
Well, it's to do with the way devices are handled. This is my (possibly incorrect) interpretation: hdx devices were traditionally IDE interfaces and sdx were traditionally SCSI interfaces. The hardware interface probably doesn't matter if you are not a kernel developer. Sometimes it was easier to introduce a new device by enabling "SCSI emulation" = "OK, it's not a SCSI device, but with a little bit of simple code, we can make it emulate one, and everything will treat it as such and it will work. We have emulated SCSI functionality so it should be called sdx. But it works! Yesss "

At the moment we seem to be in a period of transition (aren't we always? Such is the fun of linux No joke intended, it's a real dilemma ) Some distros refer to devices as sdx and some as hdx and some as a mixture, depending on, Errrr whatever was the current "best" option at the time. The trick is to look at your fstab or the content of /var/log/messages and see how how your current distro is managing things (sda or hda). Then stick with that. Enough rambling.

Quote:
The only minor problem I have now, is how to delete the unwanted /home on the root directory. When I click on /home now, it goes to the new /home on sda2. How can I reference the old /home on sda6 in order to delete it?
Yes, now your new home partition is mounted on /home everything that was in the old /home disappears (but is still there "underneath" your newly mounted home and invisible). This is as it should be.

So, to delete "the unwanted /home on the root directory":
First of all you must not remove the directory /home That is the "mountpoint" for your /dev/sda2
You need to unmount the new home (sda2) so your old home becomes visible again, then you can delete the contents of /home that are on sda6

Did you take my advice in your other (closed) thread about this problem (Click your name at left, choose Find Other Threads By Steve W, you'll find it) and create a file called I_AM_NEW_HOME or similar? Just to be sure, boot to your hdd install with your system as it is, and create a file called ThisIsMyNewHome like this in a GUI terminal:

Code:
cd ~
touch ThisIsMyNewHome
Now logout from the GUI (Logout, End Current Session for me, but basically we want to get back to the GUI login, reboot if you do not know how to do this but do not login to the GUI)

Now press <CTRL><ALT><F1> to get a text terminal.
Login as yourself. Become root:
sudo -i

Check that your new home is mounted (it will be, but just do this so you get familiar with the concept):
ls /home/yourusername

You should see a lot of files and the file ThisIsMyNewHome listed.
If there are too many files to fit on the screen try
ls /home/yourusername | grep This
Now you see the file, Yes? If not, quit now.

Now you can unmount your new home like this:
umount /dev/sda2
The terminal should say nothing because "it just happened, no error messages were necessary".

Now comes the magic. Again do a
ls /home/yourusername
You will see all your old files (but you copied them from your old home to your new one, remember?)
BUT you will not see the file ThisIsMyNewHome
Check it with this:
ls /home/yourusername | grep This
You should NOT see the filename ThisIsMyNewHome. If you do, go no further.
If you don't see the filename that means that you are in your old home on sda6. Good
Now we can irretrevably delete the contents of your old home:
cd /home/yourusername
pwd (Print Working Directory) Make sure this is /home/yourusername

Sure?
Really sure you are in /home/yourusername?
OK. Then do
rm -rF *

Your old home files that were on sda6 will be gone

Now remount your new home at the /home directory mountpoint

mount -t ext3 /dev/sda2 /home

Exit from the login terminal with exit

Press <CTRL><ALT><F7> to return to the GUI. Login. All should be well.

And the next time you boot all should be well as your fstab is mounting the correct partition (sda2) to /home

Functionality. I hope

Last edited by tredegar; 03-17-2008 at 08:02 PM. Reason: spelling
 
Old 03-17-2008, 09:03 PM   #18
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 46
Quote:
Originally Posted by tredegar View Post
Yes, now your new home partition is mounted on /home everything that was in the old /home disappears (but is still there "underneath" your newly mounted home and invisible). This is as it should be.

So, to delete "the unwanted /home on the root directory":
First of all you must not remove the directory /home That is the "mountpoint" for your /dev/sda2
You need to unmount the new home (sda2) so your old home becomes visible again, then you can delete the contents of /home that are on sda6
I already told him to do that:

Quote:
Originally Posted by slackhack
Once everything you want from /home is moved into /mnt/hda2, delete anything left over in the /home directory. When you reboot, /dev/hda2 should now mount at /home instead of /mnt, since that's what's in your fstab.
I think he was thinking that he had to remove the actual /home directory, like there were two of them, the "old" one, and the "new" one.
 
Old 03-18-2008, 01:20 AM   #19
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 12.04, Mint 12 LXDE
Posts: 426

Original Poster
Rep: Reputation: 35
Ah - just realised that this was covered in your previous advice to me on the other thread. Have now deleted the other files - but was unsure whether to delete the old /home directory itself. Please advise.

Steve
 
Old 03-18-2008, 07:23 AM   #20
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
We have told you, several times, not to delete the /home directory on /dev/sda6 (your root partition). The reason is that it is the mount point (that's referred to in fstab) that your home partition (dev/sda2) is to be mounted to at boot time.
You can delete the contents of that directory though (and you say you have already done that).

If you delete that directory, when fstab is read at boot, it will fail to mount your home partition as the "mount point /home does not exist" and you will be in trouble.

At this point it would be a good idea to print out both this and your closed thread, and read them carefully again, so you fully understand what is going on
 
Old 03-18-2008, 04:02 PM   #21
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 12.04, Mint 12 LXDE
Posts: 426

Original Poster
Rep: Reputation: 35
>>We have told you, several times, not to delete the /home directory on /dev/sda6 (your root partition).

Apologies - I realise this now, as I have seen your posts from #16 onwards. My post #15 was, I now see, not the final post on this thread but merely the last post on page 1. Not being familiar with this board I did not scroll down to see the "Page 1 of 2" at the bottom and assumed there were no more postings after my #15 message. So I posted my follow-up without seeing your comprehensive reply from earlier on today.

I shall now, as you suggested, print out and re-read all of the messages posted since my original question on the old thread. However, thanks to your patient assistance, I think I have succeeded in my original quest to move /home to a different partition.

Thank you to the posters on my thread - particularly Tredegar - for their detailed help and advice.

On a connected note... if I installed another distro and that distro's installer offered to split sda1 (my Windows partition taking up 50 percent of my disk drive space at the moment), would it name it sda8 (the next partition number up), or would it name it sda2, renumber the remaining partitions and balls everything up?
 
Old 03-18-2008, 06:48 PM   #22
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Apologies are not really required, but thank for explaining your confused situation

I was beginning to think "Grrrrr, why can't he understand my explanation? I cannot have explained it properly." [Reaching for anti-hypertensives ]

I nearly posted, in response to slackhack's post #18
Quote:
I already told him to do that:
"Yes, we both did, but he is not listening!"

Quote:
... and assumed there were no more postings after my #15 message.
Now I understand why. Confusion all round. Such is life (and sometimes, sadly, war). So thanks for clearing that up
I'm old enough to have learnt never to make assupmtions. Works for life, works for linux

Everything takes time to get used to: Win, linux, this board and the "paging". I just wanted to help you understood the concept behind the linux magic I was trying to explain. Once you understand the concept, finding a solution is usually remarkably easy, although sometimes you have to go through hoops and hurdles to get there.
"Give a man a fish, you have fed him for today. Teach a man to fish and you have fed him for a lifetime"

For me this is part of the fun of linux, and yes, I like cryptic crosswords too

So, print out, re-read, make notes to yourself, and when you understand the concept, I'll be happy, and soon you'll be helping not only yourself, but others as well.

Quote:
On a connected note...
I can't tell you what another distro might offer to do to your partition tables. It depends on a lot of things. I can tell you that when I started playing with linux I bought another HDD, and plugged it in, and made it my linux play-disk. At the time I was still thinking windows = my-cuddly-teddy-bear, and didn't want to loose my bear. Now I have grown up, the bear is somewhere in the attic, he's called "win98", but I don't miss him

If you get another disk (recommended) it'll be called /dev/sdb or even /dev/hdb (Errr, depending, see previous posts)

fdisk -l is your friend (as are the internet search engines) because it will tell you what partitions are where, and how much space you might have available.

Search engines are brilliant for linux. It was a complete revelation to me, in my early fumblings with linux, to find that I could paste a linux error message into the search engine of my choice, and soon find a solution. That approach never worked with windows, apart from "Reinstall". I soon got tired of that.

Please continue to experiment. Linux is fun. But I would suggest you get familiar and comfortable with your current distro, before you move on to another. Meanwhile you have your "bear" to retrieve when you feel the need. That's OK too
 
Old 03-19-2008, 06:07 AM   #23
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 12.04, Mint 12 LXDE
Posts: 426

Original Poster
Rep: Reputation: 35
Thank you for that general Linux advice. I am approaching my first “anniversary” of using Linux (which I am citing as 6 April 2007, being the date when I first managed to get online with my Knoppix DVD), and there’s no sign of the apex of the learning curve yet, much less the end of it! I am using Ubuntu at present as I bought a book called Beginning Ubuntu Linux, which had a Ubuntu CD at the back, but even though the book was published in late 2006 it is already out of date in some ways (the CD had Breezy Badger on it, and I’ve noticed the abilities of Ubuntu have improved significantly since that release). So I think I’ll rely on the internet for Linux instructions and information in the future – it is usually more up to date (though not always).

Like many Linux users, I imagine, I have a dual-boot system with XP on the first partition, and Linux on the rest of the disk. Though I haven’t been online using Windows since 6 April last year, and only use XP when I need to bring stuff home from work to do. It’s a shame there is no website or book (probably is, but I haven’t found it yet) devoted to teaching people who already know Windows quite well, how to use Linux properly. There’s just as much to un-learn as to learn.

I find the best thing about Linux and open source software in general is the vast world of new stuff to discover, and it is all free to do so. If you are trying to do something, for instance, in GIMP and someone says “Krita does that better”, I can just download Krita and try it out without any financial commitment being necessary. Which means it is easier to explore all avenues and opportunities and still be able to pay the mortgage....! Although software that doesn’t cost anything is probably the least of the reasons why I like Linux (the ability to surf the internet without worrying about the viruses and malware out there is something I’d pay money for – but it’s just another feature of Linux that you get gratis) – I just like the whole premises of using whatever software you want, getting upgrades for free, having people introducing new features and fixing stuff in the software without having to wait for the software company to get round to doing it – then having to pay them for the privilege of getting a release that works when it should have done anyway; and the knowledge that there are so many people out there doing so much to make it all happen. Of which you are one, Tredegar, and it’s good to know there are people all over the world to turn to with the multitude of questions that using a whole new operating system is bound to bring up.

But enough of me going on.... what I really want to know is: Does the Asus EEE PC really live up to the hype?! Or would I be better off with a cheap laptop loaded with Ubuntu?
 
Old 03-19-2008, 01:51 PM   #24
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Steve_W,

Your comments are spot-on, and thanks for the "thanks". I appreciate it.
So you have managed 10months with linux - good. Thinking back, that's about the time I realised that I liked this OS, was beginning to understand it, so set grub to default to linux instead of '98. I have never regretted that choice.

The Asus eee? I love it, and wish I was on commission as I have "sold" it to about 20 people so far.
It weighs 2lbs, is tiny, boots fast and works perfectly. I have kept the Xandros OS (a strange choice by Asus, I think), but installed KDE, and now Apache, MySql and PHP, so I can play with LAMP in quiet moments at work. It is not fast, but if I want speed, I have that at home. If you need a really portable PC, just get one! The newer 9" screen eee due out later this year I do not want as it is significantly more expensive, and with the price of the 701-4G as it is, it would not be the end of the world if it was lost/stolen/broken. Hazards when it is so small and portable.

Much more on the eee is here http://forum.eeeuser.com/ and here http://wiki.eeeuser.com/
The quality of the posts on the eee forums is not as good as here on LQ, but there is a very broad userbase. The eee wiki is excellent - a condensate of the knowledge learnt through the many forum posts.

I'll shut up now, or this thread is bound for "General". Glad you managed to move your /home. Have fun.
 
  


Reply

Tags
home, move, partition


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving /home dir to separate partition before 7.10 install Thane Ubuntu 2 10-11-2007 06:18 PM
Put /home/username/.* files in separate partition? General Linux - Hardware 10 02-12-2007 02:02 AM
How - Kubuntu Dapper with separate /home partition Optiker Linux - Newbie 20 01-21-2007 05:20 PM
Migrate Directory to Separate Disk Partition Neapolitan Red Hat 1 01-18-2006 01:51 PM
Does anyone here have a separate /root and /home partition? Kramer Linux - General 12 03-17-2004 05:52 AM


All times are GMT -5. The time now is 02:18 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration