LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-29-2017, 05:03 AM   #1
ajayss
LQ Newbie
 
Registered: Feb 2017
Posts: 11

Rep: Reputation: Disabled
Linux Not Identifying Partitions


Hi,


My hard disk which is of 1TB is having 9 partitions. FreeBSD is installed on partition number 1 and Linux is installed on partition number 3. All partitions are listed in FreeBSD. I am booting into Linux through GRUB. After booting into Linux, when I execute "fdisk -l /dev/sda" , it is listing only sda1 with 1TB size.



The partition scheme used is MBR. When I execute "ls" command in grub prompt, all the partitions are listed properly. But, after Linux boots up it is not identifying the partitions.

Does Linux understands MBR partition table by default? How can I confirm whether MBR is enabled in Linux?Can anyone help me on this.

Ajay
 
Old 06-29-2017, 05:25 AM   #2
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
could you post the entire output of fdisk -l command?
And did you try to run lsblk or blkid ? What these commands output looks like?
 
Old 06-29-2017, 06:23 AM   #3
ajayss
LQ Newbie
 
Registered: Feb 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
fdisk -l output is given below

root@localhost:/dev# fdisk -l /dev/sda
Disk /dev/sda: 1.1 TiB, 1197998080000 bytes, 2339840000 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: dos
Disk identifier: 0x90909090

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 63 2339839970 2339839908 1.1T a5 FreeBSD

Partition 1 does not start on physical sector boundary

root@localhost:/dev#
 
Old 06-29-2017, 06:51 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,792

Rep: Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575
Perhaps you should spend some time investigating how FreeBSD defines partitions - and slices.
And how it differs from M$soft and Linux.
 
Old 06-29-2017, 06:53 AM   #5
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
I do not think that linux doesn't see it's own root partition (sda3). This case you couldn't load a system.
Seems it's just a internal fdisk error
To make sure run "mount" command to see where your rootfs mounted and post output.

And try lsblk or blkid command. They should list partitions.
 
Old 06-29-2017, 08:25 AM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Code:
sudo lsblk /dev/sd[a-z] -o model,name,size,fstype,label,uuid,mountpoint
in a terminal will show us everything.
Reply here or use a pastebin and toss us the link.
This works also
Code:
sudo lsblk /dev/sd[a-z] -o model,name,size,fstype,label,uuid,mountpoint|nc termbin.com 9999
or should.
That will be a very short link,

Thanks.
 
1 members found this post helpful.
Old 06-29-2017, 10:59 AM   #7
ajayss
LQ Newbie
 
Registered: Feb 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
output of lsblk command is given below

root@localhost:# lsblk /dev/sda -o model,name,size,fstype,label,uuid,mountpoint

MODEL NAME SIZE FSTYPE LABEL UUID MOUNTPOINT

NT
MR9271-8 sda 1.1T
-sda1 1.1T ext2 05ad6613-a511-4594-ae58-c6fcfe92f876 /

root@localhost:#


mount command also shows that sda1 is mounted on /.

FYI
When the same linux distroot is booted in a "GPT" based box, it is listing all partitions correctly(sda2,sda3,sda4,sda,sda6,sda7,sda8). When it is booted in MBR based box, this issue happens.
 
Old 06-29-2017, 01:01 PM   #8
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
I guess the question comes down to how you have your disk label as MBR or GPT?

MBR only allows 4 partitions on the primary and everything else must be on the extended partition.
GTP allows everything on the primary partition.

I'm thinking your disk label is GTP and thus the MBR system is reading it incorrectly.

Last edited by lazydog; 06-29-2017 at 01:48 PM.
 
Old 06-29-2017, 01:11 PM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918
parted supports various partitioning schemes.

Please paste the output from sudo parted -l
 
Old 06-30-2017, 04:53 AM   #10
ajayss
LQ Newbie
 
Registered: Feb 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
output of parted -l is given below

admin@pod0226-wsa02:# parted -l
Model: LSI MR9271-8i (scsi)
Disk /dev/sda: 1198GB
Sector Size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number Start End Size Type Filesystem Flags
1 32.3kB 1198GB 1198GB primary ext2 boot

admin@pod0226-wsa02:#


When I run fdisk, the disk label is given as "dos", which means it is MBR.

Ajay
 
Old 06-30-2017, 06:42 AM   #11
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918
Quote:
Originally Posted by ajayss View Post
output of parted -l is given below

admin@pod0226-wsa02:# parted -l
Model: LSI MR9271-8i (scsi)
Disk /dev/sda: 1198GB
Sector Size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number Start End Size Type Filesystem Flags
1 32.3kB 1198GB 1198GB primary ext2 boot

admin@pod0226-wsa02:#


When I run fdisk, the disk label is given as "dos", which means it is MBR.

Ajay
Well that backs up the other commands and shows a single MBR partition.

Can you please boot into FreeBSD and run the equivalent command there (gpart show?).
 
Old 07-02-2017, 08:24 AM   #12
penguin404
LQ Newbie
 
Registered: Jul 2017
Posts: 8

Rep: Reputation: Disabled
what are you booting up? the main hardisk or only the linux partition? note that grub cant detect all the partition by only booting the linux patition.it needs to initialize the whole harddisk.

for that just go to the bios and boot the main harddisk.
for more help you can also try grub chainloading.

Last edited by penguin404; 07-02-2017 at 08:27 AM.
 
Old 07-02-2017, 10:35 PM   #13
ajayss
LQ Newbie
 
Registered: Feb 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
"gpart show" output for FreeBSD is given below

pod0226-wsa02:rtestuser 3] gpart show

=> 63 2339839908 mfid0 MBR (1.1T)
63 2339839908 1 freebsd [active] (1.1T)

=> 0 2339839908 mfid0s1c BSD (1.1T)
0 4194304 1 freebsd-ufs (2.0G)
4194304 16777216 2 freebsd-swap (8.0G)
20971520 4194304 4 freebsd-ufs (2.0G)
25165824 819200 5 freebsd-ufs (400M)
25985024 629145600 6 freebsd-ufs (300G)
655130624 1680514980 7 freebsd-ufs (801G)
2335645604 4194304 8 freebsd-ufs (2.0G)

pod0226-wsa02:rtestuser 3]




pod0226-wsa02:rtestuser 15] df -T

Filesystem Type 1K-blocks Used Avail Capacity Mounted on
/dev/mfid0s1a ufs 1963127 364872 1441205 20% /
devfs devfs 1 1 0 100% /dev
/dev/mfid0s1d ufs 1963127 2 1806075 0% /nextroot
/dev/mfid0s1e ufs 383319 132 352522 0% /var
/dev/mfid0s1g ufs 827051784 47449072 713438576 6% /data
/dev/mfid0s1h ufs 2029543 31 1867149 0% /var/db/godspeed
procfs procfs 4 4 0 100% /proc
linprocfs linprocfs 4 4 0 100% /compat/linux/proc
linsysfs linsysfs 4 4 0 100% /compat/linux/sys

pod0226-wsa02:rtestuser 3]


GRUB is properly identifying the partitions.
I confirmed this by entering the grub prompt and executing ls

grub > ls
hd0, (hd0,msdos1,bsd1),(hd0,msdos1,bsd2),(hd0,msdos1,bsd3),(hd0,msdos1,bsd4),(hd0,msdos1,bsd5),(hd0,msdos 1,bsd6),(hd0,msdos1,bsd7),(hd0,msdos1,bsd8),(hd0,msdos1,bsd9),(hd0,msdos)

Ajay
 
Old 07-03-2017, 08:05 AM   #14
penguin404
LQ Newbie
 
Registered: Jul 2017
Posts: 8

Rep: Reputation: Disabled
well ajay try the command "cfdisk" with su permission and tell me what do you see.

still only a /dev/sda1 of 1 tb space?

if you see all of your partitions successfully with cfdisk you can be sure there is
somthing up with your fdisk binary code (/sbin/fdisk).


cfdisk can be a good alternative of fdisk.

but if you really want fdisk you can try installing "gnu-fdisk"
you can find it in the linux repository

Last edited by penguin404; 07-03-2017 at 08:17 AM.
 
Old 07-03-2017, 08:51 AM   #15
kudsu
Member
 
Registered: Apr 2017
Location: from LA
Distribution: Slackware and anything
Posts: 50

Rep: Reputation: Disabled
try sudo fdisk -l /dev/sda
 
  


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
Identifying who or what rebooted a linux server SLES 11 njdave70 Linux - Server 1 12-08-2015 10:20 AM
LXer: Identifying File types in Linux LXer Syndicated Linux News 0 01-10-2013 11:40 AM
Identifying machine harware compatibility on linux. govindannv Linux - Newbie 3 05-06-2011 04:00 PM
System call for identifying linux distribution info1686 Programming 1 07-16-2009 06:46 AM

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

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