LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-12-2019, 09:24 PM   #1
zavmat
Member
 
Registered: Oct 2018
Posts: 184

Rep: Reputation: Disabled
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 swear this list gets longer by the day...

Link:https://www.linuxquestions.org/quest...ed-4175648466/

Last edited by zavmat; 02-21-2019 at 04:01 PM. Reason: Added Solution
 
Old 02-12-2019, 09:42 PM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Quote:
Originally Posted by zavmat View Post
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.
 
1 members found this post helpful.
Old 02-13-2019, 12:12 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
Code:
lsblk -f
 
1 members found this post helpful.
Old 02-13-2019, 12:20 PM   #4
zavmat
Member
 
Registered: Oct 2018
Posts: 184

Original Poster
Rep: Reputation: Disabled
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.
Attached Files
File Type: txt RESULTS.txt (25.5 KB, 17 views)

Last edited by zavmat; 02-13-2019 at 12:35 PM.
 
Old 02-13-2019, 12:29 PM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
chmod +x bootinfoscript
try it again?
 
Old 02-13-2019, 12:35 PM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Quote:
I downloaded the file and extracted it to desktop
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.
 
1 members found this post helpful.
Old 02-13-2019, 12:37 PM   #7
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
sudo sh bootinfoscript works too.
 
1 members found this post helpful.
Old 02-13-2019, 12:44 PM   #8
zavmat
Member
 
Registered: Oct 2018
Posts: 184

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
chmod +x bootinfoscript

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
 
Old 02-13-2019, 12:50 PM   #9
zavmat
Member
 
Registered: Oct 2018
Posts: 184

Original Poster
Rep: Reputation: Disabled
Code:
[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.

Last edited by zavmat; 02-13-2019 at 01:05 PM.
 
Old 02-13-2019, 01:29 PM   #10
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Quote:
Originally Posted by zavmat View Post
Code:
[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.:
Code:
sudo sh /home/me/Desktop/bootinfoscript
The same concepts apply to using chmod.
 
1 members found this post helpful.
Old 02-13-2019, 01:57 PM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by zavmat View Post
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.

present directory/filename
./filename

absolute path

/home/username/Downloads/filename

leading slash / before name.
 
1 members found this post helpful.
Old 02-13-2019, 08:41 PM   #12
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Code:
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.

Last edited by Brains; 02-15-2019 at 09:24 PM.
 
1 members found this post helpful.
Old 02-15-2019, 05:16 PM   #13
zavmat
Member
 
Registered: Oct 2018
Posts: 184

Original Poster
Rep: Reputation: Disabled
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?
 
Old 02-15-2019, 05:22 PM   #14
zavmat
Member
 
Registered: Oct 2018
Posts: 184

Original Poster
Rep: Reputation: Disabled
what about loop1 or loop 2?

Code:
loop1             7:1    0   6.5G  1 loop 
├─live-rw       253:3    0   6.5G  0 dm   /
└─live-base     253:4    0   6.5G  1 dm   
loop2             7:2    0    32G  0 loop 
└─live-rw       253:3    0   6.5G  0 dm   /
These seem like the right size at least.

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.
 
Old 02-15-2019, 06:52 PM   #15
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by zavmat View Post
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
 
1 members found this post helpful.
  


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
[SOLVED] URGENT, can't boot window after deleting ubuntu partitions and some mess up ThomasC Linux - Newbie 9 08-18-2009 12:35 AM
partitions - getting in a mess! er20ic Linux - Newbie 4 11-05-2006 04:16 PM
Made a mess with my swap partitions VaniaMih Linux - Newbie 12 12-01-2005 01:23 PM
Partitions, partitions, partitions..... Clueless in VA Linux - Newbie 7 08-08-2001 03:01 AM

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

All times are GMT -5. The time now is 10:47 PM.

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