LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-18-2011, 07:23 PM   #1
L a r r y
LQ Newbie
 
Registered: Aug 2011
Posts: 25

Rep: Reputation: Disabled
Red face In mid-process of moving / to new drive am I safe to restart and still be on old fs?


Hello all,
I am not a complete newbie, but I am taking on a task that I have never tried before.

Right now, I have a 14GiB partition, /dev/sda6 hosting / and another similar-sized /dev/sba7 for /home. I have had an empty partition I had formatted to ntfs for a Windows install, for a dual-boot system, but I've canned the idea, and so I have this big 45GiB partition on sdb3 that I have converted to ext3 and have followed "Moving Ubuntu to another drive," from Steve Stites.

He is moving from /dev/hdb1, I am moving from /dev/sda6; he is moving to /dev/hda1 and I am moving to /dev/sdb3.

I copied his instructions and rewrote them to my Documents as an OpenOffice document.

This is my instructions as I copied them from the other post:
Code:
Assuming that you want an ext3 filesystem: 
Step-By-Step Procedure 

umount /dev/sdb3 
mkfs -t ext3 /dev/sdb3 

Now copy everything in Ubuntu to /dev/sdb3: 

mkdir /newubuntu 
mount -t ext3 /dev/sdb3 /newubuntu 
cp -R -p /* /newubuntu 

Now change to run on the /dev/sdb3 system: 

chroot /newubuntu
This is where I have stopped.

I have done the chroot step with this result:
Code:
me@fast:~$ sudo chroot /newubuntu
[sudo] password for me: 
bash: groups: command not found
root@fast:/# sudo gedit /etc/fstab
bash: sudo: command not found
root@fast:/# gedit /etc/fstab
bash: gedit: command not found
root@fast:/# edit /etc/fstab
bash: edit: command not found
root@fast:/#
I saved some of the errors I got during the cp step. It had issues with trying to copy device placeholders, trying to copy /newbuntu into itself, trying to copy /proc processes, and I think it failed to do anything with /var to completion.

An incomplete listing:
Code:
 sudo cp -R -p /* /newubuntu
cp: preserving permissions for `/newubuntu/dev/mixer': Operation not supported
cp: preserving permissions for `/newubuntu/dev/audio': Operation not supported
cp: preserving permissions for `/newubuntu/dev/dsp': Operation not supported
cp: preserving permissions for `/newubuntu/dev/adsp': Operation not supported
cp: preserving permissions for `/newubuntu/dev/dmmidi': Operation not supported
cp: preserving permissions for `/newubuntu/dev/midi': Operation not supported
cp: preserving permissions for `/newubuntu/dev/mixer1': Operation not supported
Skip a few:
Code:
cp: preserving permissions for `/newubuntu/dev/sr1': Operation not supported
cp: preserving permissions for `/newubuntu/dev/sr0': Operation not supported
cp: preserving permissions for `/newubuntu/dev/bus/usb/001/002': Operation not supported
cp: cannot stat `/home/me/.gvfs': Permission denied
I didn't save errors occurring in the effort to copy /newubuntu through /var.

I copied /home but blew that away because I will mount /dev/sda7 as /home.


My system is Ubuntu 10.04, upgraded from 8.04 and previously 6.06, so I am using the old Grub system.


It appears that I am still running from the old install at this point, for everything I do here on my Desktop, including posting this message, is still working.

Question, since I did not edit any fstab or menu.lst, if I restart my computer, I should be booting into the old /dev/sda6 filesystem as I did before I started this?

I believe I may be right on that, for if I go to Places and Computer, I visit the file system and there is everything including /newubuntu, filled with ubuntu all over again.

Thank you!

Ubuntu 10.04 LTS. Running on:
1GHz AMD Athlon, 512Mbytes RAM
NVIDIA Video card with 64Mbytes RAM
 
Old 08-18-2011, 08:34 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,877

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
Quote:
Question, since I did not edit any fstab or menu.lst, if I restart my computer, I should be booting into the old /dev/sda6 filesystem as I did before I started this?
Since you copied instead of moving the files under / to /newubuntu, the answer is yes.

In order to boot with / in the new partition, you will have to edit /etc/fstab to show the new partition for /, and you will have to edit /boot/grub/menu.lst to change the values for "root (hdX,Y)" and in the kernel line, edit "root= " to show the new partition.
 
1 members found this post helpful.
Old 08-18-2011, 08:35 PM   #3
gammahermit
Member
 
Registered: Apr 2010
Distribution: Arch
Posts: 51

Rep: Reputation: 6
If all you have done so far is what's in the code snippet then you can safely reboot. All you've done is create a partition and copied files there. So you are right that wont effect the boot process.

As for the problems with chroot. It seems not everything was copied. I think all of those commands you tried are in /usr/bin/. So check that they were copied to /newubuntu/usr/bin/.
 
1 members found this post helpful.
Old 08-18-2011, 09:55 PM   #4
L a r r y
LQ Newbie
 
Registered: Aug 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by gammahermit View Post
If all you have done so far is what's in the code snippet then you can safely reboot. All you've done is create a partition and copied files there. So you are right that wont effect the boot process.

As for the problems with chroot. It seems not everything was copied. I think all of those commands you tried are in /usr/bin/. So check that they were copied to /newubuntu/usr/bin/.
You are right, I brought up a root nautilus and see that things are missing, including bin. I seemed to have permission issues over there also. From my user nautilus I did not have permission in the /newubuntu/usr, but I have no such restriction on the original /usr.

Thank you both for confirming what I thought, and I may have to set some permissions in the /newubuntu copies of /sys, /usr, /proc and /lost+found. /root has an X in the folder icon in the File system view from Nautilus, and /root and all these others have an X in them over in /newubuntu.
 
Old 08-18-2011, 11:05 PM   #5
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,877

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
That begs the question: when you copied / to /newubuntu, were you doing so as user or as root? If you did the copy as user, do it again as root. The copy should be complete then.
 
1 members found this post helpful.
Old 08-18-2011, 11:11 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,056

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
And do it from a liveCD - the pseudo files-systems (/dev, /proc) should be excluded. If done from a liveCD that is not an issue.
As root ...
 
1 members found this post helpful.
Old 08-19-2011, 10:56 AM   #7
L a r r y
LQ Newbie
 
Registered: Aug 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
And do it from a liveCD - the pseudo files-systems (/dev, /proc) should be excluded. If done from a liveCD that is not an issue.
As root ...
Bigrigdriver: I was doing it from a user terminal and running sudo in front of all the commands.

I believe to log in as root would involve opening my terminal, and issue "sudo terminal," which would open another terminal that is at root permissions. Would that be a fair statement?

syg00: Yes a LiveCD would get me out of copying processes, and thank you for that idea. I have burnt a few over the years of recent versions of Ubuntu, and ended up in a bash prompt with nowhere to go from there. So I dug out the Kiwi 6.06 CD and installed that, then upgraded to 8.04 as the foundation of this installation.

I'll give that a go.
 
Old 08-23-2011, 11:45 AM   #8
L a r r y
LQ Newbie
 
Registered: Aug 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
And do it from a liveCD - the pseudo files-systems (/dev, /proc) should be excluded. If done from a liveCD that is not an issue.
As root ...
I have not had much luck with getting a LiveCD to boot through to a Desktop in recent years, always ending in a Bash prompt. But I downloaded 10.04 and burned it at 1x and got one that will boot.

Working from the Live CD is a slow process, when the memory is exhausted. So I installed a fresh copy of 10.04 in the area that I was trying to copy the old system to, with lots of space for both the file system partition and the /home partition.

From GParted, I show 60.54 GiB for /dev/sb1, formatted as ext4 and mounted as /.
I show 68.02 GiB for /dev/sb6, formatted as ext4 and mounted as /home.
I show 4.00 GiB for /dev/sb5, linux-swap, downsized from about 20 GiB.

I have 497.3 MiB of memory, from the System Monitor.

I installed XSane and was scanning some letter-size documents at 150 resolution, when I was still running the big swap, and the scanner would take off at normal speed, then apparently hit a wall when I ran out of memory, and would c-r-a-w-l until finished. The displayed document would appear, and I would save it to my home in ~/Files/Scans (I think ~ is short for /home/my-account).

It would start saving and hit a wall, and it, too would c-r-a-w-l. During this time I went into System Monitor, bring up a terminal or a browser and everything was responsive and fast, while XSane was almost stalled.

(Speaking of crawl, I took about 20 hours to install from the LiveCD.)

Without all of the other action going, I would open the System Monitor and advance the nice value for XSane to -15 or -20 to get it through the grind a little faster.

I then edited the resulting image in the Gimp, and had to advance the priority on the Gimp to make it a little more responsive.

During this time, the CPU was doing 100.0% full time, and there was some 300 (less than 400) MiB of memory in solid use. The System Monitor was using between 18 to 24 percent of the CPU and the XSane or the Gimp ( only one running at a time) was 1 to 2 percent and sleeping, and everything else on the list was 0%.

of course, trying to measure system activity is like placing a voltmeter across an electrical circuit - the act of measuring loads the circuit and changes the parameters of what is actually happening. The Monitor is loading down the CPU to some extent.

I ran a
Code:
sudo swapon -a -f
The -f is supposed to resize the swap to fit the kernel as I understand it. I thought that might help with the swap efficiency.

I later ran the GParted, turned off Swap and resized the partition to 4096, rounded to the nearest cylinder. Turned on the swap and then re-ran the swapon -a -f command. Restarted the computer.

I have another interesting issue, being my first time with a Grub 2 boot menu.

I use a USB KVM switch, with a USB keyboard and USB wireless mouse. I have keyboard action on boot, and can enter my BIOS. I have NO access to the Grub menu from the keyboard. Supposed to use arrow keys to navigate up and down the list, but arrow keys do nothing.

I have my old 10.04 installation over here on /dev/sba, with fiklesystem on sba6 and /home on sba7, using the swap on sdb. I was going to add that to the boot menu so I could boot into that if needed for something, but not if I have no keyboard available during the Grub.

A longtime observation: When I am writing something in the text editor, to name one app, it would do an autosave, and I would miss a keystroke, and the system would bark like a dog.

I wrote "The world" and the system did an autosave as I hit the L key, and would bark at me, and I would look up and see "The wod" typed into the document.

I have piled a lot of stuff in here, and the last one probably has more to do with an under-capable computer than anything.

But I wonder, I reserved a bunch of space for the system; is there a way to reserve space for applications so I have (storage space (app working space)(system working space)) in the filesystem?
 
Old 08-23-2011, 09:44 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,056

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
Quote:
I have piled a lot of stuff in here, and the last one probably has more to do with an under-capable computer than anything.
I think the whole situation is the result of that "under-capable computer".
Half a Gig of memory is plenty - even for a liveCD. No way in the world can a half-decent (last 10 years say) system taken 20 hours to install from a liveCD.
Quote:
During this time, the CPU was doing 100.0% full time, and there was some 300 (less than 400) MiB of memory in solid use. The System Monitor was using between 18 to 24 percent of the CPU and the XSane or the Gimp ( only one running at a time) was 1 to 2 percent and sleeping, and everything else on the list was 0%.
That sounds like a hardware (as in disk/controller) and/or (software) driver problem.
What does the %sy and %wa (in top) look like during incidents like this ?. What does /proc/interrupts look like ?.
If it's a dodgy driver, it can be a mongrel to track down.

As for the USB keyboard issue, try without the KVM and see if it works. There are parameters you can set with grub2 to force input from USB. Google on ubuntuforums should find a relevant thread.

Last edited by syg00; 08-23-2011 at 11:26 PM.
 
Old 08-24-2011, 04:51 AM   #10
L a r r y
LQ Newbie
 
Registered: Aug 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
I think the whole situation is the result of that "under-capable computer".
Half a Gig of memory is plenty - even for a liveCD. No way in the world can a half-decent (last 10 years say) system taken 20 hours to install from a liveCD.That sounds like a hardware (as in disk/controller) and/or (software) driver problem.
What does the %sy and %wa (in top) look like during incidents like this ?. What does /proc/interrupts look like ?.
If it's a dodgy driver, it can be a mongrel to track down.
I don't understand your question, "What does the %sy and %wa look like ... please clarify.



Right now, I am buffaloed. I installed Wine, and put two longtime Windows programs on here, a sound editor called Syntrillium Cool Edit 96, which, if I am careful not to push it against the wall that slows everything else to a crawl, works in all respects as it did before, except that I cannot overwrite existing files.

Any ideas what I'm looking at here?

Before, I had it installed on drive C, a Wine folder in my home directory, with the ability to save anywhere on my Linux system that I had user permissions set, and now in the new install, I have it installed on drive C in Wine, and am writing to my home with success the first time but cannot overwrite to save changes, Permissions are owner: me, Read and Write; group: me, read-only; others: read-only.

With regard to drivers and such, I will have to admit, I seem to have a questionable pile of hardware running here. And new drives are coming out in different formats from the old eide master-slave days,
 
  


Reply


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
Restart after safe shutdown bahadirtonguc Linux - Hardware 1 11-23-2008 05:37 AM
Redirecting standard out/err mid-process? debuser123 Linux - Newbie 4 08-09-2008 01:42 AM
Problem with restart FC5 after moving aussie90 Fedora 5 02-14-2007 05:47 PM
which process are safe to stop dkc_ace Linux - General 9 02-18-2004 04:09 PM
restart a process mum_03 Linux - General 7 04-21-2003 03:37 PM


All times are GMT -5. The time now is 09:36 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration