[SOLVED] My partitions are a mess and I cannot boot into Fedora
Linux - NewbieThis 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
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.
My partitions are a mess and I cannot boot into Fedora
Link to Solution Below
here's my fdisk
Code:
Disk /dev/sda: 698.7 GiB, 750156374016 bytes, 1465149168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B7850B5C-4716-CC49-9BFC-C316EAA97D14
Device Start End Sectors Size Type
/dev/sda1 2048 411647 409600 200M EFI System
/dev/sda2 673792 552939512 552265721 263.3G Windows recovery environment
/dev/sda3 552939519 1105205239 552265721 263.3G Microsoft basic data
/dev/sda4 1360289793 1412718592 52428800 25G Microsoft basic data
/dev/sda5 1105205248 1107302399 2097152 1G Linux filesystem
/dev/sda6 1107302400 1360289791 252987392 120.6G Linux LVM
Partition 3 does not start on physical sector boundary.
Partition 4 does not start on physical sector boundary.
Partition table entries are not in disk order.
Disk /dev/mapper/fedora-swap: 5.9 GiB, 6266290176 bytes, 12238848 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora-home: 64.8 GiB, 69575114752 bytes, 135888896 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora-root: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdb: 28.7 GiB, 30752636928 bytes, 60063744 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Disk /dev/sdc: 3.7 GiB, 4004511744 bytes, 7821312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x7c3f77cf
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 0 3772415 3772416 1.8G 0 Empty
/dev/sdc2 116708 136667 19960 9.8M ef EFI (FAT-12/16/32)
/dev/sdc3 136668 178683 42016 20.5M 0 Empty
Disk /dev/loop0: 1.7 GiB, 1829224448 bytes, 3572704 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 6.5 GiB, 6981419008 bytes, 13635584 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop2: 32 GiB, 34359738368 bytes, 67108864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/live-rw: 6.5 GiB, 6981419008 bytes, 13635584 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/live-base: 6.5 GiB, 6981419008 bytes, 13635584 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[root@localhost-live ~]# sudo mkdir /mnt/dev/mapper/live-rw
mkdir: cannot create directory ‘/mnt/dev/mapper/live-rw’: No such file or directory
What is everything that is listed after the initial table? I'm trying to reinstall the boot loader but I don't know where the previous Fedora is located. Right now I'm running off a live USB.
I'm trying to reinstall the boot loader but I don't know where the previous Fedora is located. Right now I'm running off a live USB.
The script from https://github.com/arvidjaar/bootinfoscript produces a report from which the current boot configuration can be determined. Upload it with the command pastebinit and paste the resulting URL here if you need help understanding it.
You seem to have a penchant for confusion. Fedora has an very good wiki - a good place to start whenever you have a question. Whilst waiting for the bootinfoscript, run this from a live session terminal - it will be much more readable. Use sudo in need, but you shouldn't have to.
I want to thank you both for all your help on this and other threads of mine, I apologize if I've been erratic on this forum. This has been a lot of information to take in and I'm just trying to make sense of it all.
[edit] I've figured out how to run the script I think attached is the file, pastebinit: command not found unfortunately.
Why not leave it in the default Downloads folder? If you did move it to the Desktop, you will need to change directories to your /home/user/Desktop directory to run the commands to make it executable and then run the script.
it doesn't say anything when I hit enter after that for some reason. but I found the file I was in the wrong directory I suppose, and the names were different
[root@localhost-live /]# sudo sh bootinfoscript
sh: bootinfoscript: No such file or directory
[root@localhost-live /]# chmod +x bootinfoscript
chmod: cannot access 'bootinfoscript': No such file or directory
Is the problem the directory I'm in? do I need to cd directly into the file first? The answer is yes, I do.
However chmod +x still does not return an error but doesn't seem to do anything in this case.
[root@localhost-live /]# sudo sh bootinfoscript
sh: bootinfoscript: No such file or directory
[root@localhost-live /]# chmod +x bootinfoscript
chmod: cannot access 'bootinfoscript': No such file or directory
Is the problem the directory I'm in? do I need to cd directly into the file first? The answer is yes, I do.
Changing to the directory the script is in first is one option. The full pathname is required to run a script that is not in the current directory, e.g.:
it doesn't say anything when I hit enter after that for some reason. but I found the file I was in the wrong directory I suppose, and the names were different
yeah that would be the czuse of it and what everybody else said on this matter. you need to be in the same dir, which i thought you were, and or absolute path/filename even then you will not get any feed back from that command that is actually worked. if you have yourself setup properly before issuing the command it just works. then ./filename or absolute path/filename to execute it. the . (period) is present dir, and the / is the path to file, for a lack of a better way of saying it.
sudo mount /dev/mapper/fedora-root /mnt
sudo mount /dev/sda5 /mnt/boot
sudo mount /dev/sda1 /mnt/boot/efi
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount -o bind /run /mnt/run
chroot /mnt
dnf reinstall grub2-efi shim
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
exit
sudo umount /mnt/run
sudo umount /mnt/sys
sudo umount /mnt/proc
sudo umount /mnt/dev
sudo umount /mnt/boot/efi
sudo umount /mnt/boot
sudo umount /mnt
I believe all relevant information has already been provided, from within the Live CD, execute the commands in order posted in the code box above to reinstall Grub2. You may not need to install anything if you feel it's just the boot files in the EFI partition that are missing or corrupt, in which you can try skipping the "dnf reinstall" command and just do the grub2-mkconfig command, this is if you feel there is nothing wrong with grub installation already present in root and boot directories. The "sudo mount -o bind /run /mnt/run" command should give internet access in the chroot if not mistaken.
I remember making the sda6 partition because it was so large, and I told myself not to waste the space in the future in case I need to reinstall and can't figure out how to delete the partitions.
Grub appears to be fixed but none of the options listed can boot. Why sda5 which is only 1G in size and sda1 which is 200M?
sda5 is Fedora boot partition, sda1 is System partition where the UEFI firmware interface looks for boot information.
All the loop devices and /dev/mapper/live devices are part of the Fedora live CD
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.