SlackwareThis Forum is for the discussion of Slackware 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.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
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?
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.
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!
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.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Original Poster
Rep:
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.
*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.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Original Poster
Rep:
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.
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
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 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 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.
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.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Original Poster
Rep:
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!).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.