LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-24-2014, 07:53 AM   #1
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Replacement Motherboard, Maybe a Problem


The motherboard in my main workstation went to the Great Byte Bucket in the Sky and I had it replaced. I also had a spare disk drive that I asked the guy to install while it was at it -- he did both.

When I got the box, I got into the BIOS to set the clock to UTC and didn't really look at anything else because the guy told me he had activated the disk drive.

So, I booted the thing, came up just fine, went looking for /dev/sdb and it wasn't there. Hmm. OK, look in the BIOS and see if it's activated and it is -- as RAID. It's a Dell Optiplex 780 and I'm 99% that it has hardware RAID and I don't know if anything happened as a result (the first disk is /dev/sda, not a RAID disk).

I don't want RAID, I want the second drive for virtual machines and some other stuff and I ain't smart enough to know what may have happened (or not) by that BIOS configuration or the consequences of undoing the RAID setting in the BIOS.

Can I simply change the BIOS and expect that drive to become available as /dev/sdb? Or is this a big complicated mess to fix?
 
Old 09-24-2014, 08:48 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Most likely creating the fake RAID overwrote a few blocks at the end of your disk drives with the RAID metadata. Hopefully that was nothing important. Check that you can see the fake raid with the command (as root):
Code:
dmraid -r
Remove the metadata with:
Code:
dmraid -rE
Now you have two independent disks that happen to have the same contents. Before you reboot:
  • Make sure the second copy won't interfere due to duplicate volume groups, etc.
  • Turn off BIOS RAID
  • Have a rescue disk handy
 
Old 09-24-2014, 09:50 AM   #3
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Original Poster
Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Well, it appears that Slackware does not provide dmraid.

However, don't know how or why /dev/sdb is suddenly there (it wasn't yesterday)
Code:
cat /proc/partitions
major minor  #blocks  name

   8        0  488386584 sda
   8        1   15623181 sda1
   8        2   15623212 sda2
   8        3   19535040 sda3
   8        4          1 sda4
   8        5   19535008 sda5
   8        6   19535008 sda6
   8        7   19535008 sda7
   8        8   97659103 sda8
   8        9   97659103 sda9
   8       10  183679146 sda10
  11        0    1048575 sr0
  11        1    1048575 sr1
   8       16  156290904 sdb
and
Code:
cfdisk /dev/sdb
                                     cfdisk (util-linux 2.21.2)

                                        Disk Drive: /dev/sdb
                                 Size: 160041885696 bytes, 160.0 GB
                       Heads: 255   Sectors per Track: 63   Cylinders: 19457
and the size (MB) of /dev/sdb is 160041.89 which looks like nothing has been written to it?

I haven't a clue what to do from here. Maybe just partition it (two partitions, each half the disk) then go change the BIOS? Change the BIOS and then partition it? Arrgghh!
 
Old 09-24-2014, 11:27 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
I would change the BIOS settings then partition. If the 2nd drive is connected to the 2nd SATA port, it would be seen as /dev/sdb anyway
 
Old 09-24-2014, 11:39 AM   #5
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273
DIY - Off Topic

As I get older and the technology gets newer (automobiles) I find that I can't fix everything myself anymore. I'm trying to change my ways and start letting others fix the automobiles, refrigerators, dishwashers, well pump, house roof, house HVAC and such.

But I'm often disappointed when I try to save time and let someone else fix something I'm still capable of repairing (computers). If it's a generic MSWIN computer a client needs work on, I send the client to the local computer shop to deal with it. If it's something special I set up (server, network, firewall) I save time by just doing the work myself rather than having someone else "just replace a bad power supply and not touch anything else".

tronayne, I'm not questioning your judgement (EDIT: warranty, time, parts availability, skill, location, etc), just expressing my personal struggle to change my behavior and trust others to do a good job. EDIT: ... and to understand all the important factors involved.

Last edited by TracyTiger; 09-24-2014 at 12:05 PM.
 
Old 09-24-2014, 12:50 PM   #6
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Original Poster
Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Oh, I agree -- I'm 70 and in spite of decades of electronics and computers I find that much of the technology has gotten beyond me. I don't have the equipment to work on multilayer circuit boards (the tools are not cheap and I don't actually want to spend the money for a once-every-five-years use). I did check the power supply (swapped into another box) and figured out that wasn't it. The guy I go to has diagnostic equipment, he figured the problem was one or two chips on the board and we both figured that a replacement motherboard was cheaper than the time it would take to really narrow down the problem, order the part(s), swap out the bad, hope that was the only problem and go from there. The motherboard was $91 (a new one, not a rebuild) and I'll sell the bad one to somebody that will fix it and probably offer it on E-Bay as a rehabbed board (for about $50). I was down for three days and that was that.

Fortunately, you can't fix the car with your girlfriend's bobby pin any more. Throttle-body fuel injection, multidisplacement 5.7 Liter V-8s that drop off four cylinders when the transmission gets into overdrive (my Dodge RAM 1500 gets over 20 MPG as a result), effective emissions controls, well, no bobby pins: takes a diagnostic computer system to find problems and I don't mind that one little bit.

I have struggled with letting somebody else do it, too.
 
Old 09-24-2014, 02:28 PM   #7
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Rep: Reputation: 81
*lol* must be an 'Old Man Thing' (TM) - and I'm also guilty as hell. All the bits-n-pieces I used to sort - leave them to others and then complain.
EFI? Nah - go away! Grub2? - just don't ask me - ever. But to do the needful on an ole WinPC (without the Win-part) - I'm your man!! MB gone? - change it out. Get more memory. Take out the HD and turn it into a usb-disk for salvage - all no problems.
 
Old 10-03-2014, 12:45 PM   #8
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Original Poster
Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
OK, I'm being really (really!) stupid.

I want to partition the 160.0 GB drive in half. cfdiks says that Size: 160041885696 bytes, 160.0 GB, Heads: 255 Sectors per Track: 63 Cylinders: 19457.

I understand that it's nice to have partitions on even boundaries and some switch has clicked to the off position in my head and I can't remember just how to do that (like, say, dividing 160041885696 by two doesn't seem to get it because the size has to be in megabytes).

Duh.

It's going to be Linux only, ext4, remember how to use mkfs and there I'm kind of stuck.

Can anybody help get the switch back on?
 
Old 10-03-2014, 01:39 PM   #9
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Rep: Reputation: 81
Code:
echo "scale=2; 160041885696 / 512"|bc
312581808.00
At least - here's the number sectors
Not using cfdisk myself, I'm not quite sure whether it works in MB=1000000 or MB=1048576 bytes.
It ought to be the latter (being old enough), but if you try
Code:
echo "scale=2; 160041885696 / 1048576"|bc
152627.83
Your disk hasn't got an even, integral number of MB's - however, it will get you near enough to split it in 2 ...

However, if you use fdisk with 'cylinders' rather than 'sectors', then just get the division on 9728 cylinders

[edit]
Mind you - I don't really think it matters anymore these days - which is why fdisk is sector-based by default.[/edit]

Last edited by perbh; 10-04-2014 at 06:45 PM.
 
1 members found this post helpful.
Old 10-03-2014, 01:39 PM   #10
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Member Response

Hi,

I have not used cfdisk in a while but I believe you can use GB to define. So answer 80GB to the new space prompt, the prompt will say something like (in MB) but the 80GB should be recognized.

I prefer fdisk.

Hope this helps.
Have fun & enjoy!
 
1 members found this post helpful.
Old 10-03-2014, 01:51 PM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Member Response

Hi,

I do board level repairs but my bench supports the issue(s). Rule of thumb, if my diagnosis takes more than 30 minutes then it would be better to just replace the unit. You do not make much any more for board/chip level repairs. My time charge would surpass the worth of most machines that have MB failure. I tell customers/clients it is generally cheaper to shotgun the hardware when you take diagnosis time to get to the problem. Labor cost go up beyond the systems worth. Of course if the system is under warranty then I will bill the charge. I usually tell the client to return to the vendor when under warranty.

At one time I would investigate to satisfy my diagnostic skills. I really do not like surface mount technologies at my age. My mind is strong but my dexterity has suffered over the years from the many injuries to my hands. That's what you get when working with livestock.

I still have fun.
 
Old 10-03-2014, 11:33 PM   #12
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273
Quote:
Originally Posted by tronayne View Post
I want to partition the 160.0 GB drive in half.
I depend upon trial and error a lot in my life. Since the disk is "empty" you can experiment.

I don't use cfdisk (or cfdiks) but fdisk prompts for the starting and ending block number. The default ending block number is for the entire disk. I would just divide the ending block number by 2 and use that value instead.

Write the partition to disk and see the results. If it's not correct then delete the partitions, repeat and make a small adjustment in the ending block number.

Not much thinking involved.

Perhaps cfdisk offers a similar prompt or you could try fdisk. I don't have a junk disk available at the moment to give you details.

This may work good enough for your purposes. Otherwise you could leave some unpartitioned space at the end of the disk and do the trial and error process until the two partitions are exactly the same.


EDIT:
Quote:
Size: 160041885696 bytes, 160.0 GB, Heads: 255 Sectors per Track: 63 Cylinders: 19457.
My understanding is to ignore the CHS information and use the physical and logical sector sizes. In your case they are both probably 512 bytes. I believe the rule of thumb is to scale that up to 4096 bytes and use that number (4096) for sector boundaries. But I'm no expert on this.

Last edited by TracyTiger; 10-03-2014 at 11:43 PM. Reason: Following in Ruario's tradition of not giving the entire response all at once.
 
1 members found this post helpful.
Old 10-04-2014, 09:27 AM   #13
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Original Poster
Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Oh, the stuff we forget! @perbh, bc! Wow, I'd forgotten how handy that little guy is.

So, I did it with cfdisk, thank you, @onebuck, it does take 80GB as an argument for the first partition (which results in 79999.08 MB) and the second partition was just all the way to the end (which is 80042.82 MB). 80 gig one way or the other. Built the file systems with mkfs.ext4 -j and there it is, too.

I did fdisk, pretty much the same thing and I'm just going to leave it alone and use the thing.

@onebuck, I know what you mean -- if I can fix it quick, I'll do it but, in this case, $90 and I'm good to go quick and easy works out just fine. I even got lazy enough to have the guy install the new motherboard (dang!).

Thanks to everybody for the responses.

All is well that ends.
 
  


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
UBUNTU wired network not working after motherboard replacement sindhuee Linux - Newbie 4 10-22-2011 09:34 AM
motherboard power light on, nothing else starts. Sabertooth x58 motherboard xwjitftu Linux - Hardware 5 08-05-2011 08:09 AM
[SOLVED] Motherboard replacement merkigil Linux - Hardware 2 07-05-2011 01:51 AM
Problem using Mutt (mailx replacement ? notification ?) redvivi Linux - Software 1 04-12-2009 04:38 PM
Motherboard problem? cs-cam General 15 01-08-2006 06:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:24 AM.

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