LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-29-2020, 02:48 PM   #106
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,435

Rep: Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603

to reinstall grub while in chroot
Code:
grub-install --target=x86_64-efi --efi-directory=/boot

Last edited by colorpurple21859; 09-29-2020 at 02:51 PM.
 
Old 09-29-2020, 03:17 PM   #107
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,435

Rep: Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603
so like this for your system
Code:
# create mountpoint for /dev/sda3 /mnt/sda3
mount /dev/sda3 /mnt/sda3

#create /mnt/sda3/boot if it doesn't exist
mkdir /mnt/sda3/boot

#mount  boot partition
mount /dev/sda1 /mnt/sda3/boot

# make directory for /mnt/sdc
mkdir /mnt/sdc

#make encrypted disk accessable
cryptsetup luksOpen /dev/sdc ArchBackup

# create mountpoint for /dev/mapper/ArchBackup /mnt/sdc
mount /dev/mapper/ArchBackup /mnt/sdc

# copy paste backup of home to root partition
cp -a /mnt/sdc/* /mnt/sda3/

#change ownership of files internal disk to root
#this was done because the files for / in  the backup belonged to user not root.
chown -hR root:root /mnt/sda3/

#chroot into system
arch-chroot /mnt/sda3

#change ownership of user back to user
chown -hR <user name> /home/<usr directory>

#reinstall grub
grub-install --target=x86_64-efi --efi-directory=/boot
exit and reboot
if the { dev proc sys run} aren't empty in the backup, they probably should be re-created on /mnt/sda3/{ dev proc sys run}instead of copied from the backup as they are virtual directories and empty until the system is chrooted into or up and running.

Last edited by colorpurple21859; 09-30-2020 at 11:04 AM.
 
Old 09-29-2020, 03:18 PM   #108
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
to reinstall grub while in chroot
Code:
grub-install --target=x86_64-efi --efi-directory=/boot
i did this https://ibb.co/qYKDMtk

then i got this after reboot https://ibb.co/dtS0zWJ
 
Old 09-29-2020, 03:26 PM   #109
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,435

Rep: Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603
with your setup your system doesn't use a /boot/efi. the efi partition is mounted to /boot and your kernels, initramfs, and grub files are located on the efi partition. I added grub-install to the list in post 107. I don't think you will need to run the grub-mkconfig command either, but I may be wrong on that one.

Last edited by colorpurple21859; 09-29-2020 at 03:36 PM.
 
Old 09-29-2020, 03:30 PM   #110
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
with your setup your system doesn't use a /boot/efi. the efi partition is mounted to /boot and your kernels, initramfs, and grub files are located on the efi partition.
....so i did something totally wrong? now i'm totally confused.
 
Old 09-29-2020, 03:45 PM   #111
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,435

Rep: Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603
Quote:
....so i did something totally wrong? now i'm totally confused.
Nothing that can't be fixed, mount everthing as per post 107 or your post 102, arch-chroot, grub-install.
after running grub-install
Code:
umount /dev/sda1
ls /boot
If you see a efi directory(small caps)and nothing else
Code:
rmdir /boot/efi
exit reboot
 
Old 09-29-2020, 03:52 PM   #112
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,435

Rep: Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603
When uefi first came out the arch installation guides said mount the efi partition to /boot, instead of /boot/efi like most other distros was doing at the time. Your installation of arch is setup that way, The current grub install guide if I remember right says to use /boot/efi or /efi for the mount point of the efi partition. Henceforth tutorials for arch grub-reinstall using /boot/efi.
 
Old 09-29-2020, 04:01 PM   #113
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
Nothing that can't be fixed, mount everthing as per post 107 or your post 102, arch-chroot, grub-install.
after running grub-install
Code:
umount /dev/sda1
ls /boot
If you see a efi directory(small caps)and nothing else
is that about right? https://ibb.co/tmGCMJG
if yes, then i do
Quote:
Originally Posted by colorpurple21859 View Post
Code:
rmdir /boot/efi
exit reboot
 
Old 09-29-2020, 05:28 PM   #114
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,435

Rep: Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603
no, you have more files there than I would think your would, you must have done a reinstall/copy without /dev/sda1 mounted on /boot at one time or another. For right now, leave those files there, I may be missing something, you can always delete them from /boot later on your running system after umounting /dev/sda1 if you need more space on /dev/sda3,
 
Old 09-30-2020, 02:27 AM   #115
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
no, you have more files there than I would think your would, you must have done a reinstall/copy without /dev/sda1 mounted on /boot at one time or another. For right now, leave those files there, I may be missing something, you can always delete them from /boot later on your running system after umounting /dev/sda1 if you need more space on /dev/sda3,
right after i posted my last post, i turned it off and went away. Now i turned it on again and did exactly everthing as in the pic i shared yesterday https://ibb.co/tmGCMJG without the grub install, because i'v have done that already on yesterdays session. then i did
Code:
rmdir /boot/efi
exit reboot
and still got this error again at booting into arch https://ibb.co/dtS0zWJ
 
Old 09-30-2020, 03:33 AM   #116
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,435

Rep: Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603
repost
Code:
 lsblk -f
Code:
/etc/fstab
how did you create the backup, with what commands if done from a terminal?

Last edited by colorpurple21859; 09-30-2020 at 04:00 AM.
 
Old 09-30-2020, 12:12 PM   #117
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
repost
Code:
 lsblk -f
Code:
/etc/fstab
how did you create the backup, with what commands if done from a terminal?
Code:
 rsync -aAXHv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup
 
Old 09-30-2020, 12:29 PM   #118
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,435

Rep: Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603
You didn't happen to run this as user and instead of root? If you wait long enough or hit enter after getting tired of waiting do you get a login screen after the error in post 115?
 
Old 09-30-2020, 12:43 PM   #119
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
You didn't happen to run this as user and instead of root?
if you're speaking of this
Code:
 rsync -aAXHv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup
then i ran this 1 day before my Arch turned into a brick which was still fine.
Quote:
Originally Posted by colorpurple21859 View Post
If you wait long enough or hit enter after getting tired of waiting do you get a login screen after the error in post 115?
ah right, it was a ongoing process. If i press enter, nothing happend and no Login screen but when i wait 1 minute, then i'm put into the emergency mode as seen here.https://ibb.co/kSn6tMk
 
Old 09-30-2020, 01:01 PM   #120
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,435

Rep: Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603Reputation: 1603
run lsblk -f and compare the uuid of the /dev/sda3 and /dev/sda1 to what is in the /etc/fstab for / and /boot if they are different edit the one in the fstab to match what the lsblk displays, if they match and/or you still get the error rerun grub-mkconfig

Last edited by colorpurple21859; 09-30-2020 at 01:07 PM.
 
  


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
Remote Backup script needed | backup every 1-2 seconds (Online/Hot backup) reda Linux - Newbie 4 04-20-2019 05:02 PM
Replacing BIOS jmh72 Linux - Laptop and Netbook 10 04-07-2018 05:59 PM
[SOLVED] Backup, shrink backup and modify MBR of backup jps1x2 Linux - General 1 12-17-2013 05:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:12 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