I think my hard drives are messed up

Asked by tedderst

OK so I was having trouble getting my hard drives and partitions to mount so I typed in 'sudo fdisk -l' to see what was up. I read on this site somewhere that you can do that. anyway here's what it showed:

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 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: 0xd16ca578

   Device Boot Start End Blocks Id System
/dev/sda1 2 40209 322965633 f W95 Ext'd (LBA)
/dev/sda2 * 40209 91201 409597952 7 HPFS/NTFS
Partition 2 does not end on cylinder boundary.
/dev/sda5 2 20189 162154348 7 HPFS/NTFS
/dev/sda6 20189 39391 154242048 83 Linux
/dev/sda7 39391 40209 6567936 82 Linux swap / Solaris

Disk /dev/sdb: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 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: 0x6a7fce8c

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13055 104857600 7 HPFS/NTFS
/dev/sdb2 13055 91201 627713024 7 HPFS/NTFS

What's up with my sda? adb looks right...except for the HPFS perhaps. I thought i had xp installed on sda1, and ubuntu installed on sda2 and sda3 should just be a normal partition. I don't know how it got so screwed up.
btw I created the partitions with windows. as you can probably tell i don't really know what I'm doing, but trying to learn.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
PeterPall (peterpall) said :
#1

I think this doesn't look too bad:

Every partition is defined by a small set of intormation:
 - The point where this partition starts
 - The length of the partition
 - a flag that tells if the computer is allowed to boot from this partition which is ignored by most computers
 - and a number from 0 to 255 that tells you roughly what this partition is for. 83 I think is for linux - there is a number for linux swap - there are numbers for loads of other filesystems - and there is a number that can either mean HPFS or NTFS.

The partition starts and ends hopefully are where they should be,
the bootable flag isn't important or set to the right values if you don't have problems booting -
and the partition type isn't very important:

Linux has its own mechanisms to detect which format a partition is in, so if the filesystem type that fdisk reads out of the partition table is wrong - that would not do any harm normally from this side.

And Windows seems to have such an mechanism, too, since I loads of times changed the contents of a drive from FAT to NFS or from NFS from FAT - and even if I never told fdisk to write the new partition type to the partition table Windows continued understanding the data...
The only important thing might be to set the partition type of partitions you want to use under Windows to a partition type of which Windows knows it support it.

The information that a partition doesn't end on a cylinder boundary isn't this bad, too. It might indicate that the filesystem might be a little bit more effective the other way, but...

...if you want to change the type of a partition - as seen in the partition table you can do it the following way, though:

sudo fdisk /dev/sda
t <RETURN>
now choose a partition number and press <RETURN>
type in the new number. If unsure which number to choose press
L <RETURN>
If you are unsure you can still abort everything at this point witthout actually changing anything on the disk by pressing
q <RETURN>
If you really want to write the new partition list press
w <RETURN>.

If you don't like the console I think parted might a graphical way to do the same, but --- since I don't think this will solve your problem:

What exactly is the problem with mounting the disks?
Can you mount them manually? You can do so by typing something like
sudo mount /dev/sda1 /mnt
(This mounts /dev/sda1 into the directory /mnt)

If you can do that don't play with the partition table: If you change something there and don't find a way to go back it is hard - even if not impossible since there are specialized rescue programs that will recover your partitions in this situations - to recover your data.

Revision history for this message
PeterPall (peterpall) said :
#2

Found a thing that is mildly strange:
If I see it right the first partiton on hda (hda1) is starting at sector 2 and is 40209 sectors long.
The second partition (hda2) begins at sector 40209

Looks like they overlap - which would mean writing to the last two sectors of the first partition will overwrite the first ones of the second one. But I cannot think of a partitioning program that would make an error that is this stupid... ...and I think that fdisk would explicitely warn you if I were right... perhaps I somehow misinterpret the values.

Revision history for this message
tedderst (tedderst) said :
#3

Thanks for the info. All the partitions seems to start and end on the same sector so I dont think there is a problem, though I have had a few songs and movies that skip a bit and I dont remember them doing so before come to think of it. Anyway I can change this?

Also by changing the type of partitions do I lose any my data?

And when I click on a hard drive an error pops up saying: "Error Unable to mount (name of hard drive) Not Authorized"

Revision history for this message
tedderst (tedderst) said :
#4

Oh and I mounted the drives manually and they disappeared from my computer. where did they go? they arent on the desktop

Revision history for this message
PeterPall (peterpall) said :
#5

Making a partition smaller without loosing data would be a task gparted could accomplish. Be careful, though: This is a very difficult task, and - I would never attempt such a thing without backupping my data first. The only time I tried it about five yoears ago it failed.
And anyway I am not really sure if the partitions really collide.

Fpr the rest of the questions:
If you were able to mount them manually then everything is fine for now: Your data is there, but since you did mount them manually into the directory /mnt the contents of the directory appears there, but gnome won't show an icon.
The only question is: Why does the system think you are not allowed to mount the partition - and therefore outputs the "no authorization" message instead of mounting it.

Since this has always worked like magic for me and I never had to solve this problem I am somehow lost in this point.

Are you the first user added to your system, or are you in the Admin group? (A sure sign of this would be that you can install packages?) If you can this is fine.
Perhaps you can try installing policykit-desktop-privileges or "polkit-gnome-authorization" (which was the old version of it and somehow was configurable; since for my system this package is no more needed it is no longer available, so I can test it, though).
Try setting the key apps/nautilus/preferences/media_automount in gconf-editor to "enabled". There has to be a preference in a program that changes this key, but - as long as I don't find this setting - why not to change the information store itselves?

As a last resort you could make the partitions known manually using the /etc/fstab file. There are tons of tutorials about this since this originally was the only way to make partitions mount

Revision history for this message
tedderst (tedderst) said :
#6

LOL wow all I had to do was restart my computer. I changed my computer name and I guess it wouldn't give me permission until I restarted. I thought ctrl alt back would be like restarting but I guess it isn't.

Anyway, I dont think I'll try the gparted considering it's so risky and my files seems fine at the moment anyway. I do have another question though...

I'm trying to get my Creative Sound Blaster X-Fi Xtreme Audio PCIe Sound card working and I've tried numerous "solutions" I found on the web. unfortunately none have worked and just last night I came across a forum that stated that all of the ways I've been trying to get my soundcard working has been for nothing since I only have the 32bit system.

so do I really need the 64bit system to run this sound card? I'd rather not reinstall Ubuntu because I have a few programs finally running through wine now and it'd be a bitch to get them running again :P

Can you help with this problem?

Provide an answer of your own, or ask tedderst for more information if necessary.

To post a message you must log in.