During 8.10 text installation, How can I identify which sda? partition was my root partition

Asked by Aiden83

From the alternate cd text installation, How can I identify which partition is my root.

My upgrade from 8.04 to 8.10 failed.

I am now booting from the 8.10 alternate AMD64 cd and am trying to recover the broken system (Im in rescue mode).

I am now prompted to enter a device to use as root.
I have many partitions, and have to choose from /dev/sda1 ... up to ... /dev/sda12.
How can I identify which partition is my root.

I can switch to console via ALT+F2 and run fdisk -l. From this I can narrow the partitions down to those less than 10GB in size, because I remember that I made root around this size.

How can I access a partitions data to see what is stored on them?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Andre Mangan
Solved:
Last query:
Last reply:
Revision history for this message
Andre Mangan (kyphi) said :
#1

Try: fdisk -l

You can also use a live CD and use Partition Editor (System, Administration).

Revision history for this message
Andre Mangan (kyphi) said :
#2

To be specific, for sda1 use: sudo fdisk -l /dev/sda1

Revision history for this message
Aiden83 (aidendeem) said :
#3

You might not have seen that I can switch to console via ALT+F2 and run fdisk -l. But the information presented for each partitio is the device eg /dev/sda10, the cyclinders start and End, the Block size, and the ID and system type. All of my Linux partitions are type 83 - there is no label identifying whether a partition is root, home, var, and so on.

From the ALT+F2 console, running cat /etc/fstab did not give this same information (because this would correspond to the installation cd information)

My solution to this is to
1) Use trial and error and simply select each partition in turn to be root until a shell can be loaded from the partition. In my case I successively selected 3 partitions of which the first 2 failed to load a shell, but the third succeeded.

2) From the shell I could see by running ls that indeed this was my root directory. I then ran cat /etc/fstab and could see my partition labels and their corresponding UUID.

I can guess that your suggestion of using Partition Editor would work, but I thought there would be a command tool or file that I could use to get to the information held in fstab (located relative to my true root /etc/fstab, not the cd /root) from the ALT+F2 console.

Revision history for this message
Best Andre Mangan (kyphi) said :
#4

I misread the information you provided and I can see that indeed you had tried fdisk -l.

Here are a few more identifiers if you ever need them:

sudo grub
grub> find /vmlinuz

or:

df -h

or:

tree

Revision history for this message
Aiden83 (aidendeem) said :
#5

Andre, Thank you very much. I will remember those identifiers. However, from ALT+F2 loaded via the alternate installation cd, I cannot run grub (/bin/sh: grub: not found).

I instead managed to mount the root by trialling different partitions until I could see the correct directories under root.
mount /dev/sd10 /mnt did the trick.

Revision history for this message
Aiden83 (aidendeem) said :
#6

After mount /dev/sda10 /mnt, I can see vmlinuz. Also, Running df -h shows me where each /dev/sdaX is mounted on.

Thanks again

Revision history for this message
Aiden83 (aidendeem) said :
#7

Thanks Andre Mangan, that solved my question.