LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-11-2010, 09:05 AM   #31
Daravon
Member
 
Registered: Mar 2006
Posts: 170

Original Poster
Rep: Reputation: 15

I retry'd partitioning and formatting the disk. I didn't use a liveCD, rather just my running system. It seems that I can't even partition the disk with parted! Parted says that the device is busy, the same way mount does! This is a total nightmare.
Code:
chaz@brutus:~$ sudo fdisk /dev/sda

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): d
Selected partition 1

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-121601, default 1): 
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-121601, default 121601): 
Using default value 121601

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
chaz@brutus:~$
Code:
chaz@brutus:~$ sudo find / -type f -name '*.lock' -print
/home/jami/.hplip/hp-systray.lock
/home/jami/.qt/.qt_plugins_3.3rc.lock
/home/jami/.qt/.qtrc.lock
/home/jami/.gksu.lock
/home/chaz/documents/sdbu/nixbackups/.qt/.qtrc.lock
/home/chaz/documents/sdbu/nixbackups/.qt/.qt_plugins_3.3rc.lock
/home/chaz/documents/sdbu1009/nixbackups/.qt/.qtrc.lock
/home/chaz/documents/sdbu1009/nixbackups/.qt/.qt_plugins_3.3rc.lock
/home/chaz/documents/usdbu10/nixbackups/.qt/.qtrc.lock
/home/chaz/documents/usdbu10/nixbackups/.qt/.qt_plugins_3.3rc.lock
/home/chaz/documents/usdbackup/nixbackups/.qt/.qtrc.lock
/home/chaz/documents/usdbackup/nixbackups/.qt/.qt_plugins_3.3rc.lock
/home/chaz/documents/usdbackup/chaz's folder/.qt/.qtrc.lock
/home/chaz/documents/usdbackup/chaz's folder/.qt/.qt_plugins_3.3rc.lock
/home/chaz/documents/usdbackup/chaz's folder/.gksu.lock
/home/chaz/documents/usdbackup/chaz's folder/.ktorrent.lock
/home/chaz/.gksu.lock
/home/chaz/.openoffice.org/3/.lock
/home/chaz/.ktorrent.lock
/home/chaz/.hplip/hp-systray.lock

/etc/.pwd.lock
/etc/.java/.systemPrefs/.system.lock
/tmp/orbit-chaz/bonobo-activation-register-8b79c777cb2d8bb5ad92fc494c8b87e8.lock
/var/lib/nfs/.etab.lock
/var/lib/nfs/.xtab.lock
chaz@brutus:~$ 
chaz@brutus:~$
Code:
chaz@brutus:~$ sudo find / -type d -exec sh -c 'mountpoint -q "${1}" && echo "${1}"' '{}' '{}' \;
/
/proc
/proc/sys/fs/binfmt_misc
/proc/fs/nfsd
find: `/proc/2224/task/2224/fd/5': No such file or directory
find: `/proc/2224/task/2224/fdinfo/5': No such file or directory
find: `/proc/2224/fd/5': No such file or directory
find: `/proc/2224/fdinfo/5': No such file or directory
/home
/home/chaz
find: `/home/chaz/.gvfs': Permission denied
/sys
/sys/fs/fuse/connections
/sys/kernel/debug
/sys/kernel/security
/lib/init/rw
/var/lock
/var/run
/dev
/dev/shm
/dev/pts
chaz@brutus:~$
 
Old 09-12-2010, 03:04 AM   #32
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Hi,

Quote:
Then, I plugged in Drive1 as well, rebooted and manually mounted it (with no problems) and copied the entire contents of the old home partition from Drive1 onto the new, encrypted home directory on Drive2. This transferred all my files and my settings to the new system ...
I once tried to have a shared home directory with Ubuntu and fedora. It did not work out. The settings were not recognized by both systems and my desktop was messed up. So there *might* be a chance that copying the hidden settings over to your new system is the source of trouble.

Since during installation your old drive was unplugged you could post your grub.cfg file, just to make sure that the devices do not get mixed up there.

After all you might have to reinstall on your old harddisk. When you copy your files over again then do not copy the hidden files. Only copy the data, i.e. the 'visible' directories.
 
Old 09-13-2010, 04:55 PM   #33
Daravon
Member
 
Registered: Mar 2006
Posts: 170

Original Poster
Rep: Reputation: 15
Quote:
After all you might have to reinstall on your old harddisk. When you copy your files over again then do not copy the hidden files. Only copy the data, i.e. the 'visible' directories.
Since installing Ubuntu takes all of like 10 minutes nowadays, I'm willing to entertain the possibility of installing a fresh system on the unmountable HDD, and migrating my /home data over. However, with my current home directory being encrypted, will I be able to do that? Won't it just look like random data when I mount it to the new system?
 
Old 09-13-2010, 06:43 PM   #34
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by Daravon View Post
Since installing Ubuntu takes all of like 10 minutes nowadays, I'm willing to entertain the possibility of installing a fresh system on the unmountable HDD, and migrating my /home data over. However, with my current home directory being encrypted, will I be able to do that? Won't it just look like random data when I mount it to the new system?
You can remove the encryption. Hopefully you can do this from the Ubuntu install CD before reinstalling Ubuntu:
https://help.ubuntu.com/community/En...ectory%20Setup
http://art.ubuntuforums.org/showthread.php?t=1258294
In the future, I would avoid using an encrypted home directory in Ubuntu. I have read a number of threads where an encrypted home directory caused no end of problems, such as the problem you have been having with it.
There is also a bit of a performance penalty when using an encrypted home directory.
 
Old 09-14-2010, 02:13 AM   #35
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Hi,

I use encrypted disks instead of just an encrypted home directory. But If I understood correctly then the OP will have to backup his data before removing the encryption from his home directory. Since the other disk cannot be mounted this might be a problem.
@OP: before you remove the encryption boot from a liveCD. Then try to mount your home directory with the liveCD and check if you can access your data. IIRC it is on a seperate partition, right? In order to mount an encrypted partition I use cryptsetup. But I am not 100% sure if this procedure can be applied with an encrypted home.
In any case, do not remove the encryption. The links tommcd provided also contain instructions to recover your home manually. Use these instructions to mount your home on your new system on /mnt and then copy the data (not the hidden setting files) over to your new home.
 
Old 09-14-2010, 03:50 AM   #36
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
importing settings

Hi again,

previously I said that you should not copy the hidden folders over to your new system. However, since I do not know your setup, you should make a backup of them. I.e. create a directory like
mkdir /home/chaz/bkp

and copy the hidden files and folders (.dir or .file) into the backup directory. Some might contain important data. This way you could also restore your settings one step at a time. If something breaks then you will know where to look in order to repair it.

Last edited by crts; 09-14-2010 at 03:52 AM.
 
  


Reply



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
How to recover my encrypted Home directory pazzport Linux - Desktop 7 05-14-2012 11:30 PM
using encrypted home directory with xubuntu 9.10 live usb joe2748 Ubuntu 1 02-23-2010 04:54 AM
LXer: Ubuntu’s Encrypted Home Directory: A Canonical Approach to Data Privacy LXer Syndicated Linux News 0 10-22-2009 10:31 PM
/home directory in fstab gothicbob Linux - Newbie 7 10-06-2008 05:19 PM
Fstab not taking a mount of a sub directory? Rufus330Ci Linux - Networking 3 02-15-2006 01:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:43 PM.

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
Open Source Consulting | Domain Registration