LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Failing to boot after moving /boot folder to / (https://www.linuxquestions.org/questions/linux-newbie-8/failing-to-boot-after-moving-boot-folder-to-4175585810/)

zillur 07-29-2016 11:32 AM

Failing to boot after moving /boot folder to /
 
Hi there,
Recently I moved my /boot folder to / (this is my home directory with 16 TB space) for more space.
Code:

mv /boot /
After update now I can't boot up. It always says
Quote:

You need to load the kernel first
If I boot up in rescue mode, it says:
Code:

Failed to start Dynamic Tunin Daemon
My OS is Centos 7. I am new in system administration. I appreciate your help.

Best Regards
Zillur

jailbait 07-29-2016 11:41 AM

Did you reinstall your boot loader?

--------------------
Steve Stites

zillur 07-29-2016 11:48 AM

Thank you. No. Do I need to do this? How can I reinstall boot loader?

Best Regards
Zillur

michaelk 07-29-2016 03:38 PM

Is this the same system as in your other thread? If so you had three partitions /, /boot and /home. Did you really run the command as posted? If so it should not of done anything.

You can boot the install disc and reinstall grub

zillur 07-29-2016 04:08 PM

Thank you very much. I think, I ran the command.
Quote:

You can boot the install disc and reinstall grub
How can do this? I mean "boot the install disc and reinstall grub".

Best Regards
Zillur

michaelk 07-29-2016 06:03 PM

Can you confirm that this thread is about your CentOS 7 system from this thread?
http://www.linuxquestions.org/questi...ot-4175563687/

One method to move /boot from /dev/sdb1 to / (/dev/sdb2):
unmount /boot
mount /dev/sdb1 to something else like /mnt/oldboot
cp -rp /mnt/oldboot/* /boot (make sure files are copied successfully)

Comment out or delete the /boot line in your /etc/fstab file.

Boot from the CentOS 7 DVD and select rescue mode.
Once at a shell prompt follow the instructions for chroot
chroot /mnt/sysimage

Since you have two drives do you know which is the boot drive? Usually it would be sda but your /home is on sda and the OS on sdb. I can't tell if your using a legacy MBR or UEFI. Legacy BIOS and MBR would be:

grub2-install /dev/sda

As a note for others who might be interested since the OP is actually using LVM do not move /boot from its own partition.

zillur 07-29-2016 07:30 PM

Thank you very much. Yes. It is the same system. Is there any way to boot without Centos 7 DVD? I can do this:
Quote:

One method to move /boot from /dev/sdb1 to / (/dev/sdb2):
unmount /boot
mount /dev/sdb1 to something else like /mnt/oldboot
cp -rp /mnt/oldboot/* /boot (make sure files are copied successfully)

Comment out or delete the /boot line in your /etc/fstab file.
only after successful boot up.

Best Regards
Zillur

michaelk 07-29-2016 07:59 PM

You need some alternative boot device.

zillur 07-29-2016 08:02 PM

Thank you very much. What do you mean my alternative boot device? Sorry for asking details.

Best Regards
Zillur

michaelk 07-29-2016 08:05 PM

A DVD or usb drive.

jpollard 07-29-2016 09:30 PM

First you better check and see if CentOS 7 will boot using an xfs filesystem, as that is what the root filesystem is by default.

This is one of the reasons /boot has been a separate partition for ages - there are a few filesystems that will not support being used for boot. Fedora still uses ext4 for /boot, but does (like CentOS 7) use xfs for root.

zillur 07-30-2016 11:39 AM

Thank you very much.
Currently I don't have a Centos 7 DVD or USB. But, I have some writable DVD (16x|4.7GB|120min). Can I use these DVDs (Download the necessary files and write them to this DVD). If so, Can you give me the link where I can download the files? I appreciate your help very much.

Best Regards
Zillur

michaelk 07-30-2016 12:14 PM

The DVD ISO.

https://www.centos.org/download/

zillur 07-30-2016 01:43 PM

1 Attachment(s)
Thank you very much. I have downloaded and burned the iso image on the disk from my mac. Now what I need to do? Only insert the disk into the DVD rom of the linux machine?

Best Regards
Zillur

michaelk 07-30-2016 01:57 PM

Boot the DVD and when a menu displays select troubleshooting, then rescue mode and then continue. You will now be at a command line prompt. Type the commands

chroot /mnt/sysimage

cd /boot

Are there any files in the directory?


All times are GMT -5. The time now is 07:35 AM.