HolidayBuyer's Guide

Linux forum

General discussion

Gparted showing unallocated

by Ray_moe / July 28, 2013 10:32 AM PDT

I have two hard drives sda and sdb

Sda is a Ubuntu o/s with grub 2 to the mbr
Sdb is Puppy Precise with grub on /

Both o/s's will boot from Ubuntu grub display

When I open gparted,fisk -l or df -h they show sdb as unallocated with an invalid argument

Why is sdb showing unallocated yet o/s is booting
I want to fix this so that I can add another o/s to the sdb drive ??

Discussion is locked
You are posting a reply to: Gparted showing unallocated
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Gparted showing unallocated
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Try again
by R. Proffitt Forum moderator / July 29, 2013 2:30 AM PDT

But go get the latest gparted bootable so you don't have issues to investigate with an OS running and more.

And sorry, no I can't guess what is going on with this much detail. I usually have to be there and witness how such a system was created.
Bob

Collapse -
something's missing
by James Denison / July 29, 2013 3:31 AM PDT

sda and sdb only describe you have 2 drives existing. They don't describe the partitions on them.

Partitions would appear as sda1, sda2, sda3, and so on, also sdb1, sdb2, sdb3 and so on. Therefore you could have one or more partitions on both the "a" drive and the "b" drive which are used and still have unallocated space available on each or both drives not yet used.

Also, my preference is running a /boot sector about 100MB in size if having more than one system on a computer, which makes it easier to swap distros and then update the grub, instead of accidentally removing the one distro which chainloads all the other distros. Having a /boot partition keeps the chainloader section secure while swapping around partitions and distros. Right now your Ubuntu grub install is acting as the chainloader for grub.

Collapse -
Example
by James Denison / July 29, 2013 4:39 AM PDT
In reply to: something's missing

Here's an example of my triple boot system setup.

http://glenburniemd.net/Linux/TripleBootKubuntuMintWindows.jpg

there are a few small "unallocated" parts due to not matching partitions to cylinders.

first partition is windows
second is the grub boot chainloader
third is Kubuntu operating system
in the extended section, the next partition is /home where my saved files go. This allows changing distros if I want but not affecting my saved data, photos, docs, etc.
Next is Mint 14 squeezed in between two small unallocated spaces
Finally the swap file partition which can be used by either linux distro. This is best setup even before loading any distro since it's usually assigned a UUID which can change if the partition is changed and then the linux distro loses it, causing hibernation to fail unless you manually assign the old UUID to the swap file again.

Collapse -
post results
by James Denison / July 29, 2013 3:32 AM PDT

from blkid in terminal and parted -l in terminal.

Collapse -
blkid..parted -l
by Ray_moe / July 29, 2013 6:18 AM PDT
In reply to: post results

/dev/sda1: LABEL="Ubuntu" UUID="c1419ebf-8af0-40ba-a17d-7303f40fff0c" TYPE="ext4"
/dev/sda5: UUID="dd6198ec-2e5e-4a5c-8957-9591ec73b493" TYPE="swap"
/dev/sdb1: LABEL="Precise" UUID="1acdec7a-2b67-490f-8081-205ded80929e" TYPE="ext4"
/dev/sdb5: UUID="5326f82a-6aa8-4df1-879e-c2e2aa6ad920" TYPE="swap"
ray@ray-Dell-DXG051:~$ parted -l
ray@ray-Dell-DXG051:~$ sudo parted -l
Model: ATA ST380811AS (scsi)
Disk /dev/sda: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 77.9GB 77.9GB primary ext4 boot
2 77.9GB 80.0GB 2143MB extended
5 77.9GB 80.0GB 2143MB logical linux-swap(v1)


Error: Invalid argument during seek for read on /dev/sdb

Collapse -
Diagnosing
by James Denison / July 29, 2013 8:45 AM PDT
In reply to: blkid..parted -l
/dev/sda1: LABEL="Ubuntu" UUID="c1419ebf-8af0-40ba-a17d-7303f40fff0c" TYPE="ext4"
/dev/sda5: UUID="dd6198ec-2e5e-4a5c-8957-9591ec73b493" TYPE="swap"

First drive is just fine with Ubuntu and it's swap file, each in a partition.78 GB for the system, and 2 Gb for the Swap file. All is great there.


/dev/sdb1: LABEL="Precise" UUID="1acdec7a-2b67-490f-8081-205ded80929e" TYPE="ext4"
/dev/sdb5: UUID="5326f82a-6aa8-4df1-879e-c2e2aa6ad920" TYPE="swap"


This looks good too. You have one primary partition for the system and put the swap file onto the logical extended section rather than creating a second primary. You can have 4 primary partitions per drive.

What's missing is the sudo parted -l for the second drive. Did you just miss seeing and posting it, or is that error referenced what stopped it from being derived from the command? You should boot to the Ubuntu, unmount the second drive, and run FSCK on it. That may fix your problem. It's like running CHKDSK in Windows to fix file system problems.
Collapse -
fsck
by Ray_moe / July 29, 2013 10:57 AM PDT
In reply to: Diagnosing

ray@ray-Dell-DXG051:~$ sudo fsck /dev/sdb1
[sudo] password for ray:
fsck from util-linux 2.20.1
e2fsck 1.42 (29-Nov-2011)
Precise: clean, 32069/1289280 files, 483137/5152768 blocks
ray@ray-Dell-DXG051:~$

Parted -l Ended with the error: invalid argument during seek for read on /dev/sdb

Would the log on testdrive be of any help ?

Collapse -
fsck
by Ray_moe / July 29, 2013 11:01 AM PDT
In reply to: fsck

ray@ray-Dell-DXG051:~$ sudo fsck /dev/sdb
fsck from util-linux 2.20.1
e2fsck 1.42 (29-Nov-2011)
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

Collapse -
e2fsck
by Ray_moe / July 29, 2013 11:04 AM PDT
In reply to: fsck

ray@ray-Dell-DXG051:~$ sudo e2fsck -b 8193 /dev/sdb
e2fsck 1.42 (29-Nov-2011)
e2fsck: Bad magic number in super-block while trying to open /dev/sdb

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

Collapse -
Testdisk
by Ray_moe / July 29, 2013 11:07 AM PDT
In reply to: e2fsck

Sun Jul 28 13:22:33 2013
Command line: TestDisk

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 3.2.0-49-generic-pae (#75-Ubuntu SMP Tue Jun 18 18:00:21 UTC 2013) i686
Compiler: GCC 4.6
Compilation date: 2012-02-05T07:16:54
ext2fs lib: 1.42, ntfs lib: 10:0:0, reiserfs lib: none, ewf lib: none
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size 156301488 sectors
/dev/sda: user_max 156301488 sectors
/dev/sda: native_max 156301488 sectors
/dev/sda: dco 156301488 sectors
/dev/sdb: LBA, HPA, LBA48, DCO support
/dev/sdb: size 488281250 sectors
/dev/sdb: user_max 488281250 sectors
/dev/sdb: native_max 488281250 sectors
/dev/sdb: dco 488281250 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - CHS 1 1 1, sector size=512
Hard disk list
Disk /dev/sda - 80 GB / 74 GiB - CHS 9729 255 63, sector size=512 - ST380811AS, S/N:6PS0EW10, FW:3.AAE
Disk /dev/sdb - 250 GB / 232 GiB - CHS 30394 255 63, sector size=512 - WDC WD2500JS-75NCB3, S/N:WD-WCANK4222245, FW:10.02E04

Partition table type (auto): Intel
Disk /dev/sdb - 250 GB / 232 GiB - WDC WD2500JS-75NCB3
Partition table type: Intel

Analyse Disk /dev/sdb - 250 GB / 232 GiB - CHS 30394 255 63
Geometry from i386 MBR: head=255 sector=63
Current partition structure:
1 * Linux 0 32 33 2566 22 16 41222144 [Precise]
2 E extended 2566 87 18 30394 7 13 447051776
5 L Linux Swap 30133 115 63 30394 7 13 4186112
X extended 269915 143 52 272672 92 60 44288001
Must be in extended partition
2 E extended 2566 87 18 30394 7 13 447051776
X extended 269915 143 52 272672 92 60 44288001
Computes LBA from CHS for Disk /dev/sdb - 250 GB / 232 GiB - CHS 30395 255 63
Allow partial last cylinder : Yes
search_vista_part: 1

search_part()
Disk /dev/sdb - 250 GB / 232 GiB - CHS 30395 255 63

recover_EXT2: s_block_group_nr=0/157, s_mnt_count=266/38, s_blocks_per_group=32768, s_inodes_per_group=8160
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 5152840
recover_EXT2: part_size 41222720
Linux 0 1 1 2565 254 56 41222720 [Puppy]
EXT4 Large file Sparse superblock Recover, 21 GB / 19 GiB

recover_EXT2: s_block_group_nr=0/150, s_mnt_count=3/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8160
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 4923491
recover_EXT2: part_size 39387928
Linux 2566 54 49 5017 254 61 39387928
EXT4 Large file Sparse superblock, 20 GB / 18 GiB

recover_EXT2: s_block_group_nr=0/1539, s_mnt_count=2/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 50434560
recover_EXT2: part_size 403476480
Linux 5018 19 58 30133 83 30 403476480
EXT4 Large file Sparse superblock, 206 GB / 192 GiB
Linux Swap 30133 115 63 30394 6 60 4186096
SWAP2 version 1, 2143 MB / 2043 MiB
get_geometry_from_list_part_aux head=255 nbr=2
get_geometry_from_list_part_aux head=8 nbr=1
get_geometry_from_list_part_aux head=16 nbr=1
get_geometry_from_list_part_aux head=32 nbr=1
get_geometry_from_list_part_aux head=64 nbr=1
get_geometry_from_list_part_aux head=128 nbr=1
get_geometry_from_list_part_aux head=240 nbr=1
get_geometry_from_list_part_aux head=255 nbr=2

Results
* Linux 0 1 1 2565 254 56 41222720 [Puppy]
EXT4 Large file Sparse superblock Recover, 21 GB / 19 GiB
P Linux 2566 54 49 5017 254 61 39387928
EXT4 Large file Sparse superblock, 20 GB / 18 GiB
P Linux 5018 19 58 30133 83 30 403476480
EXT4 Large file Sparse superblock, 206 GB / 192 GiB
L Linux Swap 30133 115 63 30394 6 60 4186096
SWAP2 version 1, 2143 MB / 2043 MiB

interface_write()
1 * Linux 0 1 1 2565 254 56 41222720 [Puppy]
2 P Linux 2566 54 49 5017 254 61 39387928
3 P Linux 5018 19 58 30133 83 30 403476480
4 E extended LBA 30133 84 1 30394 254 63 4203738
5 L Linux Swap 30133 115 63 30394 6 60 4186096

search_part()
Disk /dev/sdb - 250 GB / 232 GiB - CHS 30395 255 63

recover_EXT2: s_block_group_nr=0/157, s_mnt_count=266/38, s_blocks_per_group=32768, s_inodes_per_group=8160
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 5152840
recover_EXT2: part_size 41222720
Linux 0 1 1 2565 254 56 41222720 [Puppy]
EXT4 Large file Sparse superblock Recover, 21 GB / 19 GiB

recover_EXT2: s_block_group_nr=0/157, s_mnt_count=58/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8160
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 5152768
recover_EXT2: part_size 41222144
Linux 0 32 33 2566 22 16 41222144 [Precise]
EXT4 Large file Sparse superblock, 21 GB / 19 GiB
Search for partition aborted
get_geometry_from_list_part_aux head=255 nbr=2
get_geometry_from_list_part_aux head=8 nbr=1
get_geometry_from_list_part_aux head=16 nbr=1
get_geometry_from_list_part_aux head=32 nbr=1
get_geometry_from_list_part_aux head=64 nbr=1
get_geometry_from_list_part_aux head=128 nbr=1
get_geometry_from_list_part_aux head=240 nbr=1
get_geometry_from_list_part_aux head=255 nbr=2

Results
Linux 0 1 1 2565 254 56 41222720 [Puppy]
EXT4 Large file Sparse superblock Recover, 21 GB / 19 GiB
Linux 0 32 33 2566 22 16 41222144 [Precise]
EXT4 Large file Sparse superblock, 21 GB / 19 GiB
Invalid partition structure.

TestDisk exited normally.

Collapse -
Did that fix it?
by James Denison / July 29, 2013 2:56 PM PDT
In reply to: Testdisk

Why were you running CHS instead of LBA in your BIOS settings for that larger "sdb" drive?

Did that drive have Windows Vista installed on it at some time in past?

This is the big story. "Invalid partition structure."

If the test disk program didn't fix it, I'd save all I could from the drive and redo it from scratch while I still could. It also might be a good idea to run smart monitor control program on it, although may have to install that, don't know if it comes in Ubuntu. It should be available from Ubuntu's repository, try Synaptic Package Manager to locate it. The reason I suggest it is because that 250 GB drive might be failing, best indicated by errors in read/write when checking the SMART for it, especially if it was working fine after the install of Puppy and then later on became problematic. The reason I had you run FSCK is because sudden shutdowns can mess up journal file system which uses inodes, but seems your Puppy may be using EXT2.

https://wiki.archlinux.org/index.php/S.M.A.R.T.

http://sourceforge.net/apps/trac/smartmontools/wiki

Collapse -
Smart data
by Ray_moe / July 30, 2013 3:34 AM PDT
In reply to: Did that fix it?

Smart data shows disk healthy
No bad sectors

Ran self test shows airflow temp failed in the past
Also shows this is sign of old age
This drive purchased in 2006

It orginally came with Windows XP
Checked bios no indication of chs or lba

Data from drive saved I have no problem redoing from scratch
Should I set it up using new partition or create new partition table
My concern is not to loose sda data

Collapse -
I'm with Bob on this now
by James Denison / July 30, 2013 9:43 AM PDT
In reply to: Smart data

If you have your data saved, set the drive back up from scratch. First is to download software from the drive manufacturer and use it to test and setup the drive like it was new again. After that use whatever you want to install on it. A seven year old drive, if it's had daily use, is really pushing it's lifetime. If the read/write errors are low, then it may still have enough life left in it. I think that's the most important indicator from SMART data. If you are looking for an inexpensive drive, I've used this site for "new" OEM closeout stock and not been disappointed. Runs about half price over new store branded.

Collapse -
a suggestion if you want to continue with the drive
by James Denison / July 30, 2013 10:38 AM PDT
In reply to: Smart data

Use a Linux distro boot disc with partitioning on it, or some other like Hiren's boot. Create the first partition to be about 10 GB, keeping in mind you will be disabling it later. Create the other partitions you want for installation. Go back then to the first partition and remove it, leaving it "unallocated". This may move the boot sector for MBR to the second section, avoiding the original sector which may have gone bad and creating problems for you. That first boot sector is the cause of many hard drive failures since that first sector being where the MBR gets put is used more than any other sector on the hard drive, yet much of the recording area on the drive may still be good for use. By also killing off 5-10-20 GB at the beginning of the drive, you will avoid most areas of the drive that are failing too. Only after doing that, put a MBR for an operating system on the drive.

Drive manufacturers also have low level formatting programs which may allow you to kill the first few sectors of a hard drive so any MBR is no longer placed there but in a later sector which will be marked so the BIOS will use it instead.

Collapse -
Thanks
by Ray_moe / July 30, 2013 11:14 AM PDT

For all the help and info
Will follow your suggestion as time permits

As of now the o/s I was in a hurry to use I have done a full install to a usb flash drive..Will use that until I get around to continue working on the sdb drive problem

I do Not want to invest Monies on the 6 yr old PC
I still have 40gb unalllocated on my sda drive I can use for another o/s
The o/s on sdb is still booting and the o/s on my two usb flash drive work fine

This has been a different and learning experience
Again thanks for everythng

Collapse -
This would have me do over.
by R. Proffitt Forum moderator / July 30, 2013 3:43 AM PDT

As to not losing files, copy what you can't lose to your backups. Yes that is PLURAL. Less than 2 copies at any time = not in a backup state.

http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step is interesting and I can't guess how the partitions got to be in such shape but I'll share that a client did this by installing a new OS but then booted up with RedHat 6 (rather old) and we can't guess what they did there.
Bob

Popular Forums
icon
Computer Newbies 10,686 discussions
icon
Computer Help 54,365 discussions
icon
Laptops 21,181 discussions
icon
Networking & Wireless 16,313 discussions
icon
Phones 17,137 discussions
icon
Security 31,287 discussions
icon
TVs & Home Theaters 22,101 discussions
icon
Windows 7 8,164 discussions
icon
Windows 10 2,657 discussions

HOLIDAY GIFT GUIDE 2017

Cameras that make great holiday gifts

Let them start the new year with a step up in photo and video quality from a phone.