LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-09-2017, 04:04 AM   #16
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 496

Rep: Reputation: 236Reputation: 236Reputation: 236

Quote:
Originally Posted by ondoho View Post
something is wrong here.
Yes, there seems to be a messy mixing of MBR and GPT. Or it could be the result of using fdisk instead of gdisk.

Sol33t303, please do the following, so that we properly understand your disks layout. If you're booting in UEFI mode with several disks, it is strategic to know exactly where to place the EFI binaries:
Code:
gdisk -l /dev/sda
gdisk -l /dev/sdb
gdisk -l /dev/sdc
 
Old 09-11-2017, 01:08 AM   #17
Sol33t303
Member
 
Registered: Jul 2017
Posts: 67

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by aragorn2101 View Post
Yes, there seems to be a messy mixing of MBR and GPT. Or it could be the result of using fdisk instead of gdisk.

Sol33t303, please do the following, so that we properly understand your disks layout. If you're booting in UEFI mode with several disks, it is strategic to know exactly where to place the EFI binaries:
Code:
gdisk -l /dev/sda
gdisk -l /dev/sdb
gdisk -l /dev/sdc
Sorry, I haven't been able to access my PC for the last 2 days, i'm back now though. Here is the output.
gdisk -l /dev/sda
Code:
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. 
***************************************************************

Disk /dev/sda: 937703088 sectors, 447.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 8B017CC5-55C3-4A3C-9B25-023020C7FC4E
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 937703054
Partitions will be aligned on 2048-sector boundaries
Total free space is 252590932 sectors (120.4 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1026047   500.0 MiB   0700  Microsoft basic data
   2         1026048       351253272   167.0 GiB   0700  Microsoft basic data
   5       921176064       937701375   7.9 GiB     8200  Linux swap
   6       603824128       605921279   1024.0 MiB  8300  Linux filesystem
   7       605923328       622288895   7.8 GiB     8200  Linux swap
   8       622290944       727148543   50.0 GiB    8300  Linux filesystem
   9       727150592       921165823   92.5 GiB    8300  Linux filesystem
gdisk -l /dev/sdb
Code:
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 87FBADF8-15DC-4F04-AC58-BF4F5674B993
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 8-sector boundaries
Total free space is 3208566927 sectors (1.5 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34          204833   100.0 MiB   EF00  System
   2          204834          466977   128.0 MiB   0C01  
   3          466978       154742817   73.6 GiB    0700  
   4       336011298       658403327   153.7 GiB   0700  
   5       755443712       755533823   44.0 MiB    0700  Basic data partition
   6       755533824       968624127   101.6 GiB   8300  
   7       968624128       976771071   3.9 GiB     8200
gdisk -l /dev/sdc
Code:
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: present

Found valid MBR and GPT. Which do you want to use?
 1 - MBR
 2 - GPT
 3 - Create blank GPT

Your answer: 2
Using GPT and creating fresh protective MBR.
Warning! Main partition table overlaps the first partition by 48 blocks!
You will need to delete this partition or resize it in another utility.
Disk /dev/sdc: 30523392 sectors, 14.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): F504238C-BB6F-4328-84C0-EA7AD186F4F5
Partition table holds up to 128 entries
First usable sector is 48, last usable sector is 3053534
Partitions will be aligned on 4-sector boundaries
Total free space is 411 sectors (205.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   2          104772          117775   6.3 MiB     0700  ISOHybrid
I'm booting from my Fedora 26 USB now instead on Ubuntu 16.04 now.
EDIT: By using the command dmesg | grep "EFI v" I can also now confirm that i'm booting in EFI mode. Here is the output:
[ 0.000000] efi: EFI v2.40 by American Megatrends

Last edited by Sol33t303; 09-11-2017 at 03:35 AM.
 
Old 09-11-2017, 04:44 AM   #18
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 496

Rep: Reputation: 236Reputation: 236Reputation: 236
Now that's better.

From everything you have written across all the posts, and from the output of the gdisk command on your SSD (sda), I can understand your SSD has a MBR partition table and your Ubuntu was booting in Legacy mode (i.e. without UEFI). Grub was installed on the MBR of the SSD and it came from the Ubuntu. That is why, when you deleted the Ubuntu partition, Grub could not find its config file (/boot/grub/grub.cfg) anymore, thus the "Unknown filesystem" message.
If it was UEFI, you would have an EFI partition on the SSD with an EFI binary for Windows and probably another Grub for Fedora.

Now, your new Fedora 26 USB boots in UEFI mode since your system has the capabilities and Fedora detects that automatically.

Finally, in order to repair your system you simply have to reinstall Grub on the MBR of the SSD:
Code:
- boot using your Fedora USB
- find out which partition is your Fedora filesystem on SSD
- mount that partition: e.g.
  > mkdir /mnt/fedora        (optionally create a mount point)
  > mount -t ext4 /dev/sda9 /mnt/fedora      (assuming sda9 is your Fedora filesystem)

- mount bind some filesystems in for grub to work
  > mount -t proc /proc /mnt/proc
  > mount --rbind /sys /mnt/sys
  > mount --rbind /dev /mnt/dev
  > mount --rbind /run /mnt/run

- chroot into the SSD Fedora:
  > chroot /mnt/fedora env -i HOME=/root PATH=/usr/bin:/usr/sbin:/bin:/sbin bash --login +h

- install GRUB:
  > grub2-install /dev/sda

- finally unmount in reverse order and restart (if certain things are not unmounting, don't worry, just reboot)
If there are any errors, please post the commands along with the errors here.

All the best.

Last edited by aragorn2101; 09-11-2017 at 04:50 AM.
 
Old 09-11-2017, 06:03 AM   #19
Sol33t303
Member
 
Registered: Jul 2017
Posts: 67

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by aragorn2101 View Post
Now that's better.

From everything you have written across all the posts, and from the output of the gdisk command on your SSD (sda), I can understand your SSD has a MBR partition table and your Ubuntu was booting in Legacy mode (i.e. without UEFI). Grub was installed on the MBR of the SSD and it came from the Ubuntu. That is why, when you deleted the Ubuntu partition, Grub could not find its config file (/boot/grub/grub.cfg) anymore, thus the "Unknown filesystem" message.
If it was UEFI, you would have an EFI partition on the SSD with an EFI binary for Windows and probably another Grub for Fedora.

Now, your new Fedora 26 USB boots in UEFI mode since your system has the capabilities and Fedora detects that automatically.

Finally, in order to repair your system you simply have to reinstall Grub on the MBR of the SSD:
Code:
- boot using your Fedora USB
- find out which partition is your Fedora filesystem on SSD
- mount that partition: e.g.
  > mkdir /mnt/fedora        (optionally create a mount point)
  > mount -t ext4 /dev/sda9 /mnt/fedora      (assuming sda9 is your Fedora filesystem)

- mount bind some filesystems in for grub to work
  > mount -t proc /proc /mnt/proc
  > mount --rbind /sys /mnt/sys
  > mount --rbind /dev /mnt/dev
  > mount --rbind /run /mnt/run

- chroot into the SSD Fedora:
  > chroot /mnt/fedora env -i HOME=/root PATH=/usr/bin:/usr/sbin:/bin:/sbin bash --login +h

- install GRUB:
  > grub2-install /dev/sda

- finally unmount in reverse order and restart (if certain things are not unmounting, don't worry, just reboot)
If there are any errors, please post the commands along with the errors here.

All the best.
When I try to bind any of the filesystems, Linux says mount point /mnt/xxx does not exist. The first to commands went fine though.
 
Old 09-12-2017, 04:13 AM   #20
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 496

Rep: Reputation: 236Reputation: 236Reputation: 236
Quote:
Originally Posted by Sol33t303 View Post
When I try to bind any of the filesystems, Linux says mount point /mnt/xxx does not exist. The first to commands went fine though.
Oh sorry, I forgot I used /mnt/fedora previously in the example. Then, I should have written /mnt/fedora/sys, /mnt/fedora/proc, ...

Do you get the point? You're just mounting the tmpfs from the live USB onto your mounted Fedora filesystem from the hard drive. These steps will just ensure that Grub finds everything it is looking for when it probes the drives.
 
Old 09-12-2017, 06:26 AM   #21
Sol33t303
Member
 
Registered: Jul 2017
Posts: 67

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by aragorn2101 View Post
Oh sorry, I forgot I used /mnt/fedora previously in the example. Then, I should have written /mnt/fedora/sys, /mnt/fedora/proc, ...

Do you get the point? You're just mounting the tmpfs from the live USB onto your mounted Fedora filesystem from the hard drive. These steps will just ensure that Grub finds everything it is looking for when it probes the drives.
Linux still says it can't find the mount points, I tried booting into my ssd again and it still takes me to grub rescue.
 
Old 09-12-2017, 12:13 PM   #22
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, puppy, ubuntu
Posts: 2,163

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
post the commands that you are entering so we can figure out what is going wrong.
 
Old 09-12-2017, 04:18 PM   #23
Sol33t303
Member
 
Registered: Jul 2017
Posts: 67

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
post the commands that you are entering so we can figure out what is going wrong.
Code:
[root@localhost ~]# mkdir /mnt/fedora
[root@localhost ~]# mount -t ext4 /dev/sda9 /mnt/fedora
[root@localhost ~]# mount -t proc /proc /mnt/fedora/proc
mount: mount point /mnt/fedora/proc does not exist
[root@localhost ~]# mount --rbind /sys /mnt/fedora/sys
mount: mount point /mnt/fedora/sys does not exist
[root@localhost ~]# mount --rbind /dev /mnt/fedora/dev
mount: mount point /mnt/fedora/dev does not exist
[root@localhost ~]# mount --rbind /run /mnt/fedora/run
mount: mount point /mnt/fedora/run does not exist
[root@localhost ~]# chroot /mnt/fedora env -i HOME=/root PATH=/usr/bin:/usr/sbin:/bin:/sbin bash --login +h
chroot: failed to run command ‘env’: No such file or directory
 
Old 09-12-2017, 06:37 PM   #24
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, puppy, ubuntu
Posts: 2,163

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
are you sure fedora is on sda9? If it was you wouldn't be getting these errors. if it is you got serious problems. what is the output of
Code:
ls /mnt/fedora/
after mounting sda9 to /mnt/fedora?

Last edited by colorpurple21859; 09-12-2017 at 08:56 PM.
 
1 members found this post helpful.
Old 09-13-2017, 11:02 AM   #25
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 6,542
Blog Entries: 2

Rep: Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579
Quote:
Originally Posted by Sol33t303 View Post
Code:
[root@localhost ~]# mkdir /mnt/fedora
[root@localhost ~]# mount -t ext4 /dev/sda9 /mnt/fedora
[root@localhost ~]# mkdir /mnt/fedora/proc
[root@localhost ~]# mount -t proc /proc /mnt/fedora/proc
[root@localhost ~]# mkdir /mnt/fedora/sys
[root@localhost ~]# mount --rbind /sys /mnt/fedora/sys

.... etc.
does that help?
 
Old 09-14-2017, 04:01 AM   #26
Sol33t303
Member
 
Registered: Jul 2017
Posts: 67

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
are you sure fedora is on sda9? If it was you wouldn't be getting these errors. if it is you got serious problems. what is the output of
Code:
ls /mnt/fedora/
after mounting sda9 to /mnt/fedora?
I've actually managed to fix grub, I installed a new Fedora installation in my free space I had after deleting Ubuntu, now GRUB is fixed and can detect all installations. During the installation of the second Fedora, I noticed that sda8 was put under "System" in the Anaconda installer while sda9 was put under somthing else, so from what I can tell Fedora must keep all it's system files in one partition and other files in another? Which would explain why I thought that Fedora was installed in sda9 while everything detected Fedora on sda8. So now must either find a way of cloning my files to the new partition (which is bigger so it shoulden't be a problem) and delete sda8/9, figure out how to correctly delete the new Fedora partition so grub dosn't brake or somehow merge the two partitions into one somehow. Here is the new output of fdisk -l
Code:
Disk /dev/sda: 447.1 GiB, 480103981056 bytes, 937703088 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: 0x3e140a9e

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1            2048   1026047   1024000   500M  7 HPFS/NTFS/exFAT
/dev/sda2         1026048 351253272 350227225   167G  7 HPFS/NTFS/exFAT
/dev/sda3       351254526 937701375 586446850 279.7G  5 Extended
/dev/sda5       921176064 937701375  16525312   7.9G 82 Linux swap / Solaris
/dev/sda6       603824128 605921279   2097152     1G 83 Linux
/dev/sda7       605923328 622288895  16365568   7.8G 82 Linux swap / Solaris
/dev/sda8       622290944 727148543 104857600    50G 83 Linux
/dev/sda9       727150592 921165823 194015232  92.5G 83 Linux
/dev/sda10 *    351258624 353355775   2097152     1G 83 Linux
/dev/sda11      353357824 603817983 250460160 119.4G 8e Linux LVM

Partition table entries are not in disk order.


GPT PMBR size mismatch (976773167 != 3907029167) will be corrected by w(rite).
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 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: 87FBADF8-15DC-4F04-AC58-BF4F5674B993

Device         Start       End   Sectors   Size Type
/dev/sdb1         34    204833    204800   100M EFI System
/dev/sdb2     204834    466977    262144   128M Microsoft reserved
/dev/sdb3     466978 154742817 154275840  73.6G Microsoft basic data
/dev/sdb4  336011298 658403327 322392030 153.7G Microsoft basic data
/dev/sdb5  755443712 755533823     90112    44M Microsoft basic data
/dev/sdb6  755533824 968624127 213090304 101.6G Linux filesystem
/dev/sdb7  968624128 976771071   8146944   3.9G Linux swap

Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.
Partition 3 does not start on physical sector boundary.
Partition 4 does not start on physical sector boundary.


Disk /dev/mapper/fedora-swap: 7.8 GiB, 8380219392 bytes, 16367616 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/fedora-home: 61.6 GiB, 66165145600 bytes, 129228800 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/fedora-root: 50 GiB, 53687091200 bytes, 104857600 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/sdc: 14.6 GiB, 15627976704 bytes, 30523392 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: 0x0975cb23

Device     Boot  Start     End Sectors  Size Id Type
/dev/sdc1  *         0 3053567 3053568  1.5G  0 Empty
/dev/sdc2       104772  117775   13004  6.4M ef EFI (FAT-12/16/32)
/dev/sdc3       117776  145855   28080 13.7M  0 Empty


Disk /dev/loop0: 1.4 GiB, 1482072064 bytes, 2894672 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: 512 MiB, 536870912 bytes, 1048576 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
I'm still live-booting because for some reason SDA8/9 is having issues connecting to the internet while SDA10/11 is having trouble recognising my keyboard (I think it's just a driver issue)
 
Old 09-14-2017, 04:04 AM   #27
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 496

Rep: Reputation: 236Reputation: 236Reputation: 236
Sol33t303, can you please post a copy of the following commands and their output:
Code:
mount -v -t ext4 /dev/sda9 /mnt/fedora
ls /mnt/fedora/{,etc}
 
Old 09-18-2017, 03:34 AM   #28
Sol33t303
Member
 
Registered: Jul 2017
Posts: 67

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by aragorn2101 View Post
Sol33t303, can you please post a copy of the following commands and their output:
Code:
mount -v -t ext4 /dev/sda9 /mnt/fedora
ls /mnt/fedora/{,etc}
I was able to get boot working when i installed the second Fedora with only 20 GB of space and was able to expend my usual Fedora partition. From root from my usuall partition neither of them have any output which would mean they were executed correctly. Now I just need to properly get grub working on this partition then i should be able to completely remove sda 10/11 and get all my space
 
Old 09-18-2017, 04:55 AM   #29
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, puppy, ubuntu
Posts: 2,163

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
So sda8 was the the root partition of your original fedora and not sda9?
 
Old 09-18-2017, 06:45 AM   #30
Sol33t303
Member
 
Registered: Jul 2017
Posts: 67

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
So sda8 was the the root partition of your original fedora and not sda9?
It looks like it is, during installation I also noticed sda8 was placed under "System" while sda9 was placed under somthing else and gparted seems to say this as well. Here is a screenshot https://imgur.com/a/BhjfU
You can see that sda8 is / while sda9 is /home. Fedora must have done that when I selected it to autoconfigure it's partition during installation. So it looks like sda8 is the root partition.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
partition space is little reducing after deleting dir. mazhar07 Linux - Server 1 05-29-2011 05:42 AM
Deleting files in Ubuntu doesn't free up space on Linux partition. kechlion Linux - General 7 12-28-2009 02:57 PM
Deleting Reserved Space on Doc Partition jman82s Linux - Hardware 1 12-13-2007 01:14 AM
Deleting unused space from a partition Tsukasa7 Linux - Newbie 2 08-31-2005 02:05 PM
deleting/resizing swap partition / increasing hd space saranga2000 Linux - Hardware 1 12-09-2004 10:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:57 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration