Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
02-08-2010, 03:01 PM
|
#1
|
LQ Newbie
Registered: Feb 2010
Location: Berlin, New Jersey
Posts: 8
Rep: 
|
Invalid partition table for swap partition that I moved with Gparted
Hi there. Glad to be a part of this forum! I was reading another thread about someone with a bad partition table and I decided to join this forum. I'm not going to take any drastic actions with the partition (/dev/sda3) in question. I am going to wait for instructions on what to do first. I am not very good with Linux and need some hand holding.
System: DELL 4550 Dual-Booted with XP and Ubuntu. Works OK, just no swap.
Well, here's what I did: I deleted a partition for Windows XP Pro because it was a trial, and it ran out. I then decided to slide the swap partition for the Ubuntu Linux that I dual-boot into over. (If this was successful, I was going to try expanding the root partition to take up the unused space.) I used Gparted on a CD to do this, as I figured it was safe to do.
I now cannot mount the swap space at bootup (and have to go into a backup version of the OS), although I can use Gparted in Linux to execute the "swapon" command, and it appears that it worked because I now see "swapoff" as an option on the context menu. (I actually don't even need a swap partition, except to hibernate.)
If I highlight the swap partition and click on "Drive" on Gparted's menu bar and select "Create Partition Table", it will erase all data on /dev/sda, so how do I fix the bad partition table non-destructively? Thanks in advance for the solution to this gnarly problem!!!
(Sorry for the convoluted explanation.)
~Keith
|
|
|
02-08-2010, 03:04 PM
|
#2
|
Senior Member
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766
Rep: 
|
post output of
#parted
>print all
|
|
|
02-08-2010, 03:23 PM
|
#3
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,357
|
Which version of Ubuntu ?. - will allow us to tell which version of grub you are likely using. Moving the swap will probably have changed the UUID, which Ubuntu uses by default.
Shouldn't be a big dealt to fix (or bypass) to get you going.
|
|
|
02-08-2010, 03:47 PM
|
#4
|
LQ Newbie
Registered: Feb 2010
Location: Berlin, New Jersey
Posts: 8
Original Poster
Rep: 
|
bad partition table for swap
Thanks for the quick replies. I tried the #parted command but it didn't work & I am not a super-user. Doesn't the # make it a remark? Is sudo the right thing to use? I am confused. What exactly do I type in terminal?
I am using Ubuntu 9.10
~Keith
|
|
|
02-08-2010, 04:07 PM
|
#5
|
LQ Newbie
Registered: Feb 2010
Location: Berlin, New Jersey
Posts: 8
Original Poster
Rep: 
|
I figured it out...
I logged in as root and executed the command. Here is the output:
Disk /dev/sda3: 2155MB 2155023360 bytes
255 heads, 63 sectors/track, 262 cylinders
Units= cylinders of 16065*512=8225280 bytes
Disk Identifier: 0x45a18b9d
(sometimes it takes a few tries to 'get it')
~Keith
|
|
|
02-08-2010, 05:18 PM
|
#6
|
Senior Member
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Rep: 
|
Quote:
Originally Posted by keith9e
I now cannot mount the swap space at bootup...
|
What is the output of "sudo fdisk -l"?
|
|
|
02-08-2010, 05:26 PM
|
#7
|
LQ Newbie
Registered: Feb 2010
Location: Berlin, New Jersey
Posts: 8
Original Poster
Rep: 
|
output for sudo fdisk -l:
Are you ready?
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0b9530a0
Device Boot Start End Blocks Id System
/dev/sda1 * 1 12926 103828063+ 7 HPFS/NTFS
/dev/sda2 12927 14078 9253440 83 Linux
/dev/sda3 14332 14593 2104515 82 Linux swap / Solaris
Disk /dev/sdb: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9dc96e9e
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 6902 55440283+ 6 FAT16
/dev/sdb2 6903 7297 3172837+ 83 Linux
Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8d399bc0
Device Boot Start End Blocks Id System
/dev/sdc1 1 22960 184426168+ 7 HPFS/NTFS
/dev/sdc2 22961 23344 3084480 6 FAT16
/dev/sdc3 23345 60801 300873352+ 7 HPFS/NTFS
Disk /dev/sdd: 2004 MB, 2004877312 bytes
129 heads, 32 sectors/track, 948 cylinders
Units = cylinders of 4128 * 512 = 2113536 bytes
Disk identifier: 0x406041be
Device Boot Start End Blocks Id System
/dev/sdd1 * 1 949 1957872 b W95 FAT32
Partition 1 has different physical/logical endings:
phys=(956, 128, 32) logical=(948, 75, 32)
Disk /dev/sde: 2004 MB, 2004877312 bytes
129 heads, 32 sectors/track, 948 cylinders
Units = cylinders of 4128 * 512 = 2113536 bytes
Disk identifier: 0xc3072e18
Device Boot Start End Blocks Id System
/dev/sde1 * 1 949 1957872 6 FAT16
Partition 1 has different physical/logical endings:
phys=(956, 128, 32) logical=(948, 75, 32)
~Keith
|
|
|
02-08-2010, 07:12 PM
|
#8
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,357
|
I haven't been playing with grub2, but I'd be inclined to believe you should be able to solve this by regenerating the control files with a simple Edit: before doing that, just to confirm which version of grub you are running, let's see the output of
Last edited by syg00; 02-08-2010 at 07:14 PM.
|
|
|
02-08-2010, 09:09 PM
|
#9
|
LQ Newbie
Registered: Feb 2010
Location: Berlin, New Jersey
Posts: 8
Original Poster
Rep: 
|
grub version
grub-install (GNU GRUB 1.97~beta4)
OK to update grub?
~Keith
|
|
|
02-08-2010, 09:16 PM
|
#10
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,357
|
Yes, that's grub2 - the update should fix things.
|
|
|
02-08-2010, 09:40 PM
|
#11
|
LQ Newbie
Registered: Feb 2010
Location: Berlin, New Jersey
Posts: 8
Original Poster
Rep: 
|
Updating grub
Well, updating grub did not help. I rebooted, and this is the error message that I have been greeted with since this happened:
One or more of the mounts listed in /etc/fstab cannot yet be mounted: swap: waiting for UUID=da3fa708-4a56-42f6-8688-1d44f4587d9e
Press ESC to enter a recovery shell
...Which I did and here we are. By the way, thank you all for your kind help. It is much appreciated. A rather tenacious little mystery we have here... (Yes I have backed up!)
~Keith
Last edited by keith9e; 02-08-2010 at 09:42 PM.
|
|
|
02-09-2010, 12:37 AM
|
#12
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,357
|
Would have helped had we had that message earlier. Try this from the recovery shell
Code:
sed -r -i '/swap/ s/^UUID/# UUID/' /etc/fstab
This will comment out the swap entry, and you should be able to reboot. Once back in, you'll need to fix that entry for swap. From a terminal
Code:
sudo gedit /etc/fstab
This is a fullscreen "windows" editor. Find the line that looks like:
# UUID=27818159-796a-4937-8258-2787adc2d5e1 none swap sw 0 0
This needs fixing - delete the "#" and the following blank we just added. Now open another terminal and enter this
Code:
blkid | grep -i swap
This will show you the new UUID for the swap partition. The new value must replace the UUID= value in /etc/fstab that you have open in the editor.
Should be all.
|
|
|
02-09-2010, 06:56 AM
|
#13
|
LQ Newbie
Registered: Feb 2010
Location: Berlin, New Jersey
Posts: 8
Original Poster
Rep: 
|
Success at last!
Gentlemen: Good morning. I apologize profusely for not following proper troubleshooting protocol and stating the exact error message in the first place.
I followed your latest instructions precisely and they worked flawlessly!
This has been a great learning experience. Now, I am wondering about expanding the root partition to fill all available space. I would use Gparted again, but I fear that I will somehow disable my system due to lack of experience in this area. I don't need the space, so I'm not going to do it unless I am 100% assured of success. I would just like to hear your professional opinions on this subject. (Man, Linux sure is finicky!)
In any case, it has been a pleasure to be helped by you. Thanks!
~Keith
|
|
|
02-09-2010, 07:18 AM
|
#14
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,357
|
Quote:
Originally Posted by keith9e
(Man, Linux sure is finicky!)
|
Blame the Ubuntu devs for this, not Linux. They chose to use UUID like this because they (presumably) thought their users were too stupid to understand traditional device addresses.
I regularly move things around - I avoid UUID like the plague.
As for expanding the root, that looks like it should be o.k. - so long as you expand it to the "right" (in the gparted graphic). Nothing to worry about if you merely use the spare space between sda2 and sda3.
|
|
|
02-09-2010, 07:29 PM
|
#15
|
LQ Newbie
Registered: Feb 2010
Location: Berlin, New Jersey
Posts: 8
Original Poster
Rep: 
|
Avoiding UUID
OK, let's say I decide to expand my root partition. Exactly how would I go about avoiding UUID? 
|
|
|
All times are GMT -5. The time now is 01:50 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|