LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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


Reply
  Search this Thread
Old 08-11-2011, 11:00 AM   #1
macreal
LQ Newbie
 
Registered: Jun 2010
Location: England
Distribution: RH for several years but never happy with it. Recently Ubuntu but changing to Debian.
Posts: 14

Rep: Reputation: 0
restoring discs to `blank' after problems with several distros


Is there a simple way to restore a system to a `blank' state?

I bought a new machine with a Intel DH67CF motherboard and Intel 82579V nic and have had trouble with Ubuntu, Debian, Fedora and Zenwalk. In the process I have made changes to the partition table and have now got in a mess. Here's a brief history:

I have used Ubuntu for 3 or 4 years but do not like the changes with 11.04 and wanted to switch to Debian. It turns out that the 82579V card won't work with Debian squeeze
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627700
I tried wheezy but the graphical installer had no characters, just a little rectangle where each symbol should be. I tried Ubuntu (10.04 and 11.04) after all but neither set up the network, I guess because Ubuntu inherited the problem with the 82579V from debian.

I tried Fedora 15 (some years ago I used redhat until it forked). It installed including the network but two things: it refuses to do software updates (`an unspecified transaction error has occurred'), and I put it by accident on the second disc, and then deleted the partition on the first disc. I have two 1TB discs and meant to just uninstall the distro on the first disc.

OK, so since the Fedora wasn't doing updates, I thought I would install it again, this time on sda. I gather I'd deleted the mbr so I used sysresccd to put GPT on sda. I was reading http://www.sysresccd.org/Sysresccd-P...PT-disk-layout

Fedora installed again, with network, but again won't do software updates.

I tried Zenwalk, which I've been using on a very old laptop, but that won't install on a gpt partition.

I'm pretty fed up. I'm not an expert (you can tell) but I'm not a complete novice either; I've been using RH and Ubuntu for 10+ years for technical work with only the odd difficulty (and no sysadmin support).

I guess I messed up by deleting the partition on sda; this partition reports a bad alignment now. But it also seems there was already a problem. So my questions are:

- Is there a simple way to restore the two discs to a `neutral' condition, preferably with grub2 ?

- Would the simplest solution be to install a nic which debian/ubuntu would accept?

The discs are both 1TB ATA WDC. Incidentally, both Fedoras fail to recognize my root password; I could have mistyped up once, but not on both installations.

Thanks so far ...

M
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 08-11-2011, 11:33 AM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
What do you mean by "neutral" condition? If you mean blank the disks, I would just boot up system rescue cd and then do a shred -v -z -n 0 /dev/sda and do the same for /dev/sdb. This will wipe the disks with zeros and essentially make it look like a brand spankin' new disk.

If you actually care about securely erasing a disk, change the "-n 0" to "-n 3" which will make shred do 3 writes of random data (which will take quite a long time) before overwriting the disk with zeros.
 
Old 08-11-2011, 11:48 AM   #3
macreal
LQ Newbie
 
Registered: Jun 2010
Location: England
Distribution: RH for several years but never happy with it. Recently Ubuntu but changing to Debian.
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks pljvaldez. I'm glad to be told about shred but I meant something different. Actually
I don't have any data on this machine yet.

Installing these distros, and making changes to the partition tables, has left the system
corrupted in ways I don't understand. (Unlikely that it was corrupted when I bought it.)
I would like, for example, to remove the fedoras completely. I tried to do that by deleting
a partition but that deleted the mbr as well.

If it isn't practical to remove the fedoras (and others), I'd just like to restore the mbr
to the sda disc so that I can make a fresh start.
 
Old 08-11-2011, 11:53 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,286

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
try man shred

It's not necessary, and I never have. Delete the partitions, make afresh, and use mke2fs [OPTIONS], or don't bother and most distros will make partitions for you. Google the 82579V, and go around it if the problems are not sorted. I tried on kernel.org and found this
http://www.kernel.org/pub/linux/deve...1.2.17-1.patch

which would seem to indicate a patch around 2.6.35, so maybe things are better with a later kernel. The suckiness of graphics I can't help you with except to keep upgrading and hoping. Don't keep hopping from distro to distro. Stay with one and sort it. As you are looking for latest versions, debian might not be best for you, but you choose.
 
1 members found this post helpful.
Old 08-11-2011, 12:33 PM   #5
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Quote:
Originally Posted by macreal View Post
Installing these distros, and making changes to the partition tables, has left the system
corrupted in ways I don't understand. (Unlikely that it was corrupted when I bought it.)
I would like, for example, to remove the fedoras completely. I tried to do that by deleting
a partition but that deleted the mbr as well.

If it isn't practical to remove the fedoras (and others), I'd just like to restore the mbr
to the sda disc so that I can make a fresh start.
There's two options:

1) Just delete all the partitions and start over letting the distro install the bootloader to the MBR.

2) Boot into the distro you would like to keep. From there, do a grub-install /dev/sda as root (or use sudo). Some distros (like Ubuntu) have a "Boot Repair" graphical interface that does the same thing.

After you've restored your primary distro bootloader to the MBR, then open GParted and just delete the other partitions you don't want anymore. BE CAREFUL not to delete any of the partitions related to you current install.
 
Old 08-11-2011, 03:43 PM   #6
macreal
LQ Newbie
 
Registered: Jun 2010
Location: England
Distribution: RH for several years but never happy with it. Recently Ubuntu but changing to Debian.
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks but no luck so far. On each of sda and sdb I could not delete everything. supposedly because the paritions were mounted (can't see how). The details are below.

I tried to load ubuntu 1104 from a dvd but got tossed into a minimal grub command line.

I'll try again tomorrow.

Quote:
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' '
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en-US' lang='en-US'>
<head>
<meta http-equiv='Content-Type' content='text/html;charset=utf-8' />
<title>GParted Details</title>
</head>
<body>
<p>GParted 0.9.0</p>
<p>Libparted 2.4</p>
<table border='0'>
<tr>
<td colspan='2'>
<b>Create Primary Partition #1 (ext2, 931.51 GiB) on
/dev/sdb</b>&nbsp;&nbsp;00:00:02&nbsp;&nbsp;&nbsp;&nbsp;( ERROR )
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<table border='0'>
<tr>
<td colspan='2'>
create empty partition&nbsp;&nbsp;00:00:02&nbsp;&nbsp;&nbsp;&nbsp;( ERROR )
</td>
</tr>
</table>
<table border='0'>
<tr>
<td colspan='2'>
libparted messages&nbsp;&nbsp;&nbsp;&nbsp;( INFO )
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<table border='0'>
<tr>
<td colspan='2'>
<i>Error informing the kernel about modifications to partition /dev/sdb1 --
Device or resource busy. This means Linux won&apos;t know about any changes
you made to /dev/sdb1 until you reboot -- so you shouldn&apos;t mount it or
use it in any way before rebooting.</i>
</td>
</tr>
</table>
<table border='0'>
<tr>
<td colspan='2'>
<i>Failed to add partition 1 (Device or resource busy)</i>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>========================================</p>
</body>
</html>
 
Old 08-11-2011, 03:56 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Just delete the partition(s) from a live cd or an installer.
 
Old 08-11-2011, 11:33 PM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
If the problems are caused by a messed up GPT partition table this may be effectively (not entirely) removed with
Code:
dd if=/dev/zero of=/dev/sd<whatever> count=1 bs=1M
where <whatever> is a and then b in your case.

That command writes all zeros to the space where a legacy partition table goes. An installation done after that should act as if the HDDs are unused and will prompt to partition from scratch.
 
2 members found this post helpful.
Old 08-12-2011, 05:57 AM   #9
macreal
LQ Newbie
 
Registered: Jun 2010
Location: England
Distribution: RH for several years but never happy with it. Recently Ubuntu but changing to Debian.
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks to you all.

I got zenwalk onto sda last night and Ubuntu 11.04 onto sdb this morning. Thanks business_kid:
must have been the newer kernel in 11.04. (I did try to install 11.04 a few days ago and it
didn't work, but maybe the cd burner I used was faulty: I'm burning cds on a different machine now.)

Ubuntu shows sda as misaligned by 512 bytes. So I reformatted sda from Ubuntu, thanks jefro,
and now shows clean, but still misaligned. I'll try what catkin says this afternoon.
 
Old 08-12-2011, 10:44 AM   #10
macreal
LQ Newbie
 
Registered: Jun 2010
Location: England
Distribution: RH for several years but never happy with it. Recently Ubuntu but changing to Debian.
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
If the problems are caused by a messed up GPT partition table this may be effectively (not entirely) removed with

Code:
dd if=/dev/zero of=/dev/sd<whatever> count=1 bs=1M

where <whatever> is a and then b in your case.
I did that -- thanks catkin. Seemed successful but when I looked at disk utility again sda
was still showing misaligned by 512. Rebooted and the warning had disappeared.

I then put ubuntu 11.04 on sda, needing to do own partitioning because no boot partition.
However the install seemed ok. But disk utility now showed sda misaligned by 1024 bytes.

So did another installation of ubuntu 11.04 on sda. This time it was happy to do the partitioning
itself. Finally disk utility shows no misalignment.

So, finally all's well. I think. I formatted sdb to remove the earlier ubuntu.

!
 
Old 08-12-2011, 10:58 AM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Happy you got there in the end macreal

Threads can be marked SOLVED via the Thread Tools menu
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Strange phenomena with Blank Discs; device won't mount lupusarcanus Linux - Newbie 15 01-03-2010 09:12 PM
LXer: UNetbootin lets you install distros without burning discs LXer Syndicated Linux News 0 01-26-2008 01:10 AM
Problems restoring gnome desktop to original default drokmed Linux - Software 3 10-19-2006 12:38 PM
problems restoring w/ swsusp Marvelloard Linux - Software 1 09-03-2005 04:56 PM
Restoring /boot, lilo problems. Duo Slackware 5 02-07-2005 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration