Avatar of TeknikDev
TeknikDev
Flag for United States of America asked on

mkinitramfs - new SATA hard disk in linux server

All,

I need help from someone with linux programming experience.

I just brought new SATA drive and copied my Linux installation and my system will not boot because my root device is now probably /dev/sda1.

Can someone please walk me step by step on how to use this command so I can get my new hard disk to be recognize by linux and boot from it.

I'm new to linux programming, so any help would be greatly appreciated!
LinuxLinux OS DevStorage Software

Avatar of undefined
Last Comment
Mazdajai

8/22/2022 - Mon
Mazdajai

Exactly how did you copy? Did you use dd?
TeknikDev

ASKER
Clonezilla
Mazdajai

Did you still have the old drive plugged in now?

Can you post the output of df -h in both drives?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
TeknikDev

ASKER
Can you provide commands please. Im new to linux
Mazdajai

df -h
Mazdajai

Sounds like you made a incomplete / baf clone. You can also review the options and try it again.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
David

/dev/sda is a disk associated with a SCSI and/or USB port, or a SATA disk behind a RAID controller.  What was the device name of the original disk?  If it was /dev/hd* then you have a lot of things that have to be done.  You may even have to build a proper kernel with more device drivers.

So be specific, need to know exactly what you had, how you copied, how this disk is attached, boot loader config files just to start.  Screen shots would be nice too.  Just saying it doesn't "work" could be anything from disk being unplugged to it crashing.  Need specifics.
TeknikDev

ASKER
Dlethe please provide commands you like me to run.

Can someone please respond to my original request and at least show me how to execute the mkinitramfs???
David

TekNikDev - If you can't answer the specifics of the questions I asked, then how do you expect me or anybody else to diagnose and fix the problem? Don't worry about mkinitramfs.
Your help has saved me hundreds of hours of internet surfing.
fblack61
TeknikDev

ASKER
Ok - fair enough! But can someone still give me info on how to run that command? I am trying to learn how to execute it.

So the source hard disk were RAID 5 copied onto a USB device. I believe it was /dev/sda for the source hd. So I tried to get around this, understanding that the USB driver may not be present in the initial boot ram image, so I then copied the USB drive to an SATA hard disk, hoping the scsi driver would be linking the hard disk. Unfornately, that didn't work either. So I did some research and found that the mkinitramfs command would re-create the ram image so it detects all the connected devices on the existing machines.

The hard disks were cloned using Clonezilla and it's grub 1.5. I have no idea how to get to the bash command interface if any to execute the standard linux commands. So I load up Clonezilla boot cd and lauch the command line interface that way. I believe GRUB is limited command line interface.  Hope this clear things up a bit!

cat procfdisk -lfstab
David

the source disk(s) were part of a RAID5?  No wonder you have this problem. The metadata from the RAID5 can't possibly be correct.   One does not clone disks from behind a RAID controller and expect the result to work.

You are wasting your time trying to get this to work.  You need to have somebody who is familiar with the metadata architecture and layout to do a proper clone for you.
TeknikDev

ASKER
What happens if I get the same system with the RAID 5?

I thought it could work given that it has only one logical drive. The system was still working after the RAID config got deleted (don't ask me how, but after the clone, it went away, perhaps the raid battery error indicated in the boot up message).

Logical RAID
start up
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
David

I interpreted your answer as if you were cloning individual disks.  Sorry.  But that still doesn't let me know if this was done correctly to begin with, and there just isn't enough to assess it.  You could have multiple problems.  If you had cloned the RAID5 properly then it would mount no matter what.

Frankly, only way at least I could fix this would to assume nothing, and get remote command line access and use a binary editor to start by looking at the partitions. I really don't think it is possible to help you by running through all of the possibilities. You need to find somebody who will remote in and just fix the problem.  (No, and I am not implying I will do this, even for a fee).  If you want this fixed, you need to hire a local LINUX talent and have them go onsite and figure it all out.  This type of problem is  difficult to resolve in this type of forum.  Too many things could be wrong.

If you want to ask moderator to delete the question, I have no problems saying it is OK.
Mazdajai

Like I said wouldn't it to be easier to re-do the clone?
ASKER CERTIFIED SOLUTION
David

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Mazdajai

I have not catch up and know RAID 5 was involved, Author's middle posts with RAID5 info should have been in the question. :)

I agree with the following. I have done one few years, it works with Acronis.

The source disk(s) were part of a RAID5?  No wonder you have this problem. The metadata from the RAID5 can't possibly be correct.   One does not clone disks from behind a RAID controller and expect the result to work.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck