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-30-2020, 01:23 PM   #121
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by colorpurple21859 View Post
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
while being in emergency mode or via Arch-ISO liveusb?
 
Old 09-30-2020, 01:38 PM   #122
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
boot the live iso mount and mount the partitions as per post 107,
Code:
nano /mnt/sda3/etc/fstab
will let you edit the fstab without having to chroot. If you need to rerun grub-mkconfig -o /boot/grub/grub.cfg you will need to be in chroot.
 
Old 09-30-2020, 01:50 PM   #123
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
boot the live iso mount and mount the partitions as per post 107,
Code:
nano /mnt/sda3/etc/fstab
will let you edit the fstab without having to chroot. If you need to rerun grub-mkconfig -o /boot/grub/grub.cfg you will need to be in chroot.
which have i to change into the same UUID?
https://ibb.co/n3TBCY0
 
Old 09-30-2020, 01:58 PM   #124
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
what is
Code:
 lsblk -f
 
Old 09-30-2020, 02:04 PM   #125
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
what is
Code:
 lsblk -f
https://ibb.co/jbWGNKn
 
Old 09-30-2020, 02:44 PM   #126
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
you need to edit the fstab uuids to match the ones in the lsblk output
something like this with the whole uuid numbers
Code:
#/dev/sda3
UUId=19a467dd...-ddce5f / ext4 ....
#/dev/sda1
UUID=3E31-E8D0  /boot   vfat  ....
#/dev/sda2
UUID=e2892fs4-...-f3c24   none   swap
after editing the fstab, it might be best to chroot and rerun grub-mkconfig

Last edited by colorpurple21859; 09-30-2020 at 02:45 PM.
 
Old 09-30-2020, 03:18 PM   #127
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 need to edit the fstab uuids to match the ones in the lsblk output
something like this with the whole uuid numbers
Code:
#/dev/sda3
UUId=19a467dd...-ddce5f / ext4 ....
#/dev/sda1
UUID=3E31-E8D0  /boot   vfat  ....
#/dev/sda2
UUID=e2892fs4-...-f3c24   none   swap
after editing the fstab, it might be best to chroot and rerun grub-mkconfig
you are blessed by the patience and chill you have! thank you so much! I got my whole system working again like before the whole crash! i have to recover first from the joy. Santa came early this year. can i gift you a giftcard for about 10$ for eBay?
 
Old 09-30-2020, 04:53 PM   #128
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Your welcome and great you have it working. I appreciate the offer, but I'll pass. I enjoy answering questions, it keeps the mind working.
The next time you run a backup, if you run it as root, you won't have to do the chown commands if you have to copy from the backup.
 
Old 10-01-2020, 08:05 AM   #129
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
I enjoy answering questions, it keeps the mind working.
good to know
Quote:
Originally Posted by colorpurple21859 View Post
The next time you run a backup, if you run it as root, you won't have to do the chown commands if you have to copy from the backup.
dully noted!


===summary and fine cut===

1.
i read from one of your post, that i can remove /boot/efi from this edited photo https://ibb.co/jkKvCws or to do any change from this Guide since it isnt the newest but helpful atleast as proven in this thread?

2.
Code:
GUIDE for WHOLE BACKUP WORKING OUT OF THE BOX!

# make directory for /mnt/sda3
mkdir /mnt/sda3

# 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/

#chroot into system
arch-chroot /mnt/sda3

#reinstall grub
grub-install --target=x86_64-efi --efi-directory=/boot

#exit out from Internal Arch
exit

#list disks and partitions in tree
lsblk -f

/etc/fstab

#edit the fstab [NOTE:AND write the same UUID each partition from lsblk -f into the fstab!]
nano /mnt/sda3/etc/fstab

grub-mkconfig -o /boot/grub/grub.cfg

#exit out from Internal Arch
exit

#restart system
reboot
 
Old 10-01-2020, 11:04 AM   #130
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Quote:
GUIDE for WHOLE BACKUP WORKING OUT OF THE BOX!
There is always the exception, but for the most part, yes, this should get you back up and running. Depending on the problem, you may not have to do the steps after the copy command.

My assessmnent of what happened,
You original statement,
Quote:
I had to reinstall Arch due accidentally moving the /root directly
The partition order had changed. You had the right idea of needing to reinstall grub, problem was mount point of your efi partition was different from the tutorial you were following.
The second issue your backup was done as user instead of root and the cp command was incorrect.
The third issue, at some point, the partitions uuid's had changed(reformatted maybe?) resulting in an incorrect /etc/fstab and grub.cfg.

Anyways it's great you got it working and a method of restoring if it breaks again.
 
Old 10-01-2020, 11:17 AM   #131
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Quote:
i read from one of your post, that i can remove /boot/efi
run this until you get a not mounted message, should only have to do once
Code:
umount /dev/sda1
then
Code:
rm -r /boot/*
reboot to make sure everthing still works
 
Old 10-01-2020, 12:25 PM   #132
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
run this until you get a not mounted message, should only have to do once
Code:
umount /dev/sda1
then
Code:
rm -r /boot/*
like this ? https://ibb.co/fY5ct9C

reboot is luckily already mentioned in the GUIDE by default.
 
Old 10-01-2020, 01:02 PM   #133
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
This has nothing to do with the image you posted, all this does is delete some files on /dev/sda3 that are not needed. your not booting the live iso. Boot and login to your user desktop, open a terminal on the desktop,
Code:
su -
password: <root password>
umount /dev/sda1
rm -r /boot/*
exit
exit
reboot to make sure it boots okay.

Last edited by colorpurple21859; 10-01-2020 at 01:03 PM.
 
Old 10-01-2020, 01:51 PM   #134
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
This has nothing to do with the image you posted, all this does is delete some files on /dev/sda3 that are not needed. your not booting the live iso. Boot and login to your user desktop, open a terminal on the desktop,
Code:
su -
password: <root password>
umount /dev/sda1
rm -r /boot/*
exit
exit
reboot to make sure it boots okay.
? wait, you want me to do that right now on the fully functional Linux?
 
Old 10-01-2020, 02:18 PM   #135
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Yes you can remove them on a running system, if you are uncomfortable about deleting them, it won't hurt nothing to leave them there. The files don't take up that much space. The files are mostly the same ones on the efi partition, that some how was copied/installed to /boot on /dev/sda3 partition. The files weren't there when this thread was first started. When the efi partition is mounted at /boot these files aren't seen, even through their still located on the partition

Last edited by colorpurple21859; 10-01-2020 at 02:22 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 08:35 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