can not su root

Asked by stan kulikowski ii

i have installed ubuntu 10.10 on a new harddrive. i need to transfer my email settings and my other data from my old harddrive which was fedora 10. when i mount the old harddrive in a usb external housing, i can not find my data. it is difficult to look at anything on that harddrive since it is owned by 'root' which apparently does not exist in ubuntu. how do i get my old data from the fedora harddrive onto the ubuntu harddrive?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu sudo Edit question
Assignee:
No assignee Edit question
Solved by:
Eliah Kagan
Solved:
Last query:
Last reply:
Revision history for this message
Thomas Krüger (thkrueger) said :
#1

Unlike Fedora Ubuntu has a locked root account, which means you can not log in as root.
To get root rights you have to use sudo.
Using sudo plus your desired command is the preferred, but you can get a root shell with "sudo su".

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#2
Revision history for this message
Eliah Kagan (degeneracypressure) said :
#3

By the way, you can run a file browser window as root, though you should be careful with this because you can easily make a mistake and damage your system--also, you should keep in mind that files copied or created by root are often owned by root, without permissions granted to other users (but of course, you can change this, by right-clicking on a file, or a folder full of files, clicking Properties, and making appropriate changes in the Permissions tab).

To run the file browser as root in Ubuntu, press Alt+F2, then type (or paste) this in and press enter:

gksu nautilus

I recommend closing the window as soon as you're done, so you don't accidentally confuse it with a regular (non-root) file browser window later.

Revision history for this message
stan kulikowski ii (stankuli) said :
#4

i have used 'gksu nautilus' before i posted this question. it does not help. i still can not find any of my data upon the old harddrive from fedora. there just appears to be three 'efi' 'grub' and 'lost+found' but none of them contain anything that looks my data. the properties for the drive says that there is 21 megabytes somewhere, which i assume is my data, but i can not find it anywhere.

so my question still is a problem. how do i find and transfer my personal data from the fedora harddrive to the ubuntu drive?
                          stan

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#5

21 MB is not very much. Maybe that drive has multiple partitions, and you're looking in the wrong one. The other partitions should appear in the Places menu--if there are any others, try browsing to them to see if they contain your data. If you still cannot find your data, then open a Terminal window (Ctrl+Alt+T) and run the following command, by pasting it in and pressing enter:

df -h; mount; sudo fdisk -l

You may be asked for your password. As you enter it, you won't see any placeholder characters (like *). That's OK--just type it in and press enter.

Then select all the text from the Terminal (Edit > Select All), copy it to the clipboard (Edit > Copy), and paste it here.

Revision history for this message
stan kulikowski ii (stankuli) said :
#6

i was wondering if i was just seeing a boot sector and that all my real data is in a hidden partition somewhere. i just checked the properties on this /boot disk that shows up, and it does say its size is 168 MB with 21 MB used. so most of the hard disk is not being accounted for. ubuntu places only shows /boot and nothing else from that harddrive.

ok, here are the results of the fdisk query:

stan@stan-ubuntu:~$ df -h | mount | sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00098d64

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 59272 476097536 83 Linux
/dev/sda2 59272 60802 12285953 5 Extended
/dev/sda5 59272 60802 12285952 82 Linux swap / Solaris

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b5e77

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 25 200781 83 Linux
/dev/sdb2 26 38913 312367860 8e Linux LVM
stan@stan-ubuntu:~$

so now what?

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#7

The command I gave you to run was:

df -h; mount; sudo fdisk -l

The command you ran was:

df -h | mount | sudo fdisk -l

Please open a new Terminal window, run the first of these two commands (i.e., the correct one), and post all the text from the Terminal here. Like I said before, I recommend copying the command and pasting it into the Terminal, as this reduces the chance of errors. The output of the correct command will probably include the output of the wrong one, but it will contain additional potentially useful information as well.

Revision history for this message
stan kulikowski ii (stankuli) said :
#8

ok, sorry for the misunderstood punctuation.

stan@stan-ubuntu:~$ df -h; mount; sudo fdisk -l
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 447G 2.9G 422G 1% /
none 2.0G 268K 2.0G 1% /dev
none 2.0G 200K 2.0G 1% /dev/shm
none 2.0G 84K 2.0G 1% /var/run
none 2.0G 0 2.0G 0% /var/lock
/dev/sdb1 190M 13M 168M 7% /media/_boot
/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/stan/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=stan)
/dev/sdb1 on /media/_boot type ext3 (rw,nosuid,nodev,uhelper=udisks)
[sudo] password for stan:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00098d64

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 59272 476097536 83 Linux
/dev/sda2 59272 60802 12285953 5 Extended
/dev/sda5 59272 60802 12285952 82 Linux swap / Solaris

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b5e77

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 25 200781 83 Linux
/dev/sdb2 26 38913 312367860 8e Linux LVM
stan@stan-ubuntu:~$

Revision history for this message
zvacet (ivicakolic) said :
#9

Places>file system>media and see if there is your partition.

Revision history for this message
stan kulikowski ii (stankuli) said :
#10

zvacet wrote: Places>file system>media and see if there is your partition.

Places does not have 'file system' choice, but if i select 'home folder' or 'desktop' then a 'file system' choice shows a 'media' folder. that folder only has '/boot' folder like the desktop displays.

Revision history for this message
Best Eliah Kagan (degeneracypressure) said :
#11

The output of that command reveals that your Fedora system used an LVM (http://en.wikipedia.org/wiki/Logical_volume_management), which is why mounting its partition(s) containing your data is more complicated than usual. These instructions tell you how to mount volumes in an LVM:

http://quonn.wordpress.com/2010/12/01/how-to-mount-lvm-partition-on-ubuntu/

Those instructions assume you have a root shell, so either preface each command with "sudo " (without the quotes, but with the space at the end), or run

sudo -s

first, so that every subsequent command you run (until you run the command: exit) is run as root.

If you have any problems or any confusion arises, please feel free to post a reply here. When doing so, please include all the text from the Terminal, starting from where you began following those instructions.

Revision history for this message
stan kulikowski ii (stankuli) said :
#12

ok, i had to install lvm2 package but the instructions from quonn.wordpress.com i could follow, so i could see my data on the old harddrive and then copy it to my ubuntu harddrive. the constant use of sudo to perform root activities seems a little annoying but i suppose i will get used to it. this process seemed a little unintuitive, but at least it was resolvable.

my thanks for your help in getting through this.

Revision history for this message
stan kulikowski ii (stankuli) said :
#13

Thanks Eliah Kagan, that solved my question.