Linux - HardwareThis 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.
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.
despite using linux exclusively for over a year I still had an old FAT partitiion knocking around. So I decided to get rid of it finally, I used the Mandrake partitioning tool (I'm running slackware now) but for whatever reason it produced an error message and my machine crashed. now looking at the partitions using fdisk:
/dev/hdb5 1 10424 5253192 83 Linux
/dev/hdb6 10424 12511 1052226 82 Linux swap
/dev/hdb7 12512 29182 8401963+ 83 Linux
/dev/hdb8 29182 45853 8401963+ 83 Linux
/dev/hdb9 45854 62443 8361328+ 83 Linux
I've highlighted the interesting bit, it appears that the partioning didn't complete and I have 2 partitions in the same space both of which I can mount. The partition marked empty is the old partition (with all the old files still on it) and the other is the new partition. Does anyone know of a safe method of correcting this, I don't want to have to begin my system fom scratch.
The data on these partitions is no longer useful, right? It sounds like that from your post.
[list=1][*]A safe method would be any method that began with backing up all the useful partitions on that device. So do that. Do it now.[*]Next, download and burn a copy of Knoppix or some other bootable Linux "Live CD," so that you have a chance of fixing stuff if you do gronk your drive (assuming you have a bootable CD drive). This has saved my bacon more than twice, when I ignored Step 1. It'll also be handy if you totally trash your drive, and you did remember Step 1. Be sure you back it up using an application that is also on the CD.[*]OK. Install GNU/parted if you don't have it.[*]Reboot your box in single-user mode. For LILO, it's:
Code:
boot: Linux vga=normal s
Dunno about the GRUB. Make sure both partitions are umount'ed[/list=1]
Now, run parted:
Code:
# parted /dev/hdb
If you are not familiar with parted, just type
Code:
(parted) help
I'd start with
Code:
(parted) print
Write down the start and end blocks of each partition, in case you need to rescue one or some. Next, you have choices like:
Code:
check MINOR do a simple check on the filesystem
cp [FROM-DEVICE] FROM-MINOR TO-MINOR copy filesystem to another
partition
help [COMMAND] prints general help, or help on COMMAND
mklabel LABEL-TYPE create a new disklabel (partition table)
mkfs MINOR FS-TYPE make a filesystem FS-TYPE on partititon MINOR
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a filesystem
move MINOR START END move partition MINOR
name MINOR NAME name partition MINOR NAME
print [MINOR] display the partition table, or a partition
quit exit program
rescue START END rescue a lost partition near START and END
resize MINOR START END resize filesystem on partition MINOR
rm MINOR delete partition MINOR
select DEVICE choose the device to edit
set MINOR FLAG STATE change a flag on partition MINOR
I'd probably try rm'ing both of those partitions, if they show up. Be warned that parted complains a lot. You need to read it's complaints carefully, there is usually a clue or two in it.
Also, be aware that parted is not like fdisk - it does what you tell it, right away, so be careful and thoughtful.
Yeah I was gonna do that (though parted seems alot better than fdisk) but wondered if there was a better less risky way (i have never been comfortable with partitions one stupid mistake and you're buggered and I make stupid mistakes alot).
Right I should have mentioned his before, bu the 2 partitions are no the end of my problems the partiion table is in someway corrupted according to parted:
Warning: Unable to align partition properly. This probably means that another
partitioning tool generated an incorrect partition table, because it didn't havethe correct BIOS geometry. It is safe to ignore,but ignoring may cause
(fixable) problems with some boot loaders.
do you think erasing the 2 bad partitions will fix this or is this a bigger problem
I've done the re-partition and everything went fine. Just the little problem about partitions being misaligned still around. But I suppose I'll have to ignore it and hope my hard drive doesn't blow up anytime soon. Unless anyone else knows of a none destructive way of fixing this.
I've had this with every Linux partition ever created by PartitionMagic (great for Windows, sucks for Linux). The only way to stop parted's whining is to let it re-partition. The price is too high, I say. Let it whine.
Originally posted by Abject I've had this with every Linux partition ever created by PartitionMagic (great for Windows, sucks for Linux). The only way to stop parted's whining is to let it re-partition. The price is too high, I say. Let it whine.
Huh, no complaints here. Especially since rebuilding my Toshiba from the factory disks:
a) Wipes out every partition. Linux included.
b) Recreates one large partition. In NTFS no less.
Okay, so I could have bought the full version of XP just avoid this (maybe). Not.
So I got Partition Magic, shrank the original partition, split the remainder up into several pieces, made my linux partitions (Ext3 & swap), formatted them, and converted my NTFS partition to FAT32.
All in one swip. And no misalignment problems either.
I don't think that parted is quite up to that level of performance.
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 62443 31471240+ f W95 Ext'd (LBA)
/dev/hdb2 62444 119150 28580328 83 Linux
/dev/hdb5 1 10424 5253192 83 Linux
/dev/hdb6 10424 12511 1052226 82 Linux swap
/dev/hdb7 12512 29182 8401963+ 83 Linux
/dev/hdb8 29182 45853 8401963+ 83 Linux
/dev/hdb9 45854 62443 8361328+ 83 Linux
As for why extended first patrtition ask windows 2000 which kindly corrupted both my old windows partition and linux partitions (prompting my complete dedication to linux, sodding compatibility plus it helped college started using openoffice)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.