LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 07-13-2016, 10:02 AM   #1
thenob
LQ Newbie
 
Registered: Feb 2009
Posts: 14

Rep: Reputation: 4
MBR screwed


After a failed EFI-setup we managed to install slackware-14.1 with raid-1 (version 0.90) and lilo as bootloader.

Now a year later I want to add another partition, but got a strange problem.

- Fdisk tells me the partition-table is parted:
~# fdisk -l /dev/sdb

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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 identifier: 0x3a68aa11

Device Boot Start End Blocks Id System
/dev/sdb1 2048 8390655 4194304 82 Linux swap
/dev/sdb2 8390656 134219775 62914560 fd Linux raid autodetect
/dev/sdb3 134219776 553650175 209715200 fd Linux raid autodetect





- Parted tells me it does not have a valid fake msdos-partition
~# parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
(parted) print
Warning: /dev/sdb contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos partition table,
as it should. Perhaps it was corrupted -- possibly by a program that doesn't understand GPT partition tables. Or perhaps you deleted the GPT
table, and are now using an msdos partition table. Is this a GPT partition table?
Yes/No?
Model: ATA WDC WD3202ABYS-0 (scsi)
Disk /dev/sdb: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 20.5kB 105MB 105MB boot
2 105MB 4400MB 4295MB linux-swap(v1)
3 4400MB 68.8GB 64.4GB raid
4 68.8GB 284GB 215GB raid


Could lilo overwrite the MBR resulting in errors in parted?

And most of all: how should I resolve this?


Another question (that's why I needed a new partition).
The developer from sqmail asked me to mount the qmail-queue synchronous (mount -o sync).
However I read that synchronous on a raid-1 system really slows down the system because hammering the disks.
Reason for that was that qmail couldn't get an exclusive lock
fdinfo = open_excl(fn.s);
if (fdinfo == -1) { log3s("warning: unable to create ",fn.s," for info\n"); goto fail; }
However inodes are not a problem (15% in use)

So will mounting synchronous probably solve the problem?


Best regards,
Pascal
 
Old 07-13-2016, 11:02 AM   #2
bormant
Member
 
Registered: Jan 2008
Posts: 426

Rep: Reputation: 240Reputation: 240Reputation: 240
Protective MRB for GPT (GUID partition table) contains one partiton for all GPT partitions to prevent non-GPT tools from creating partitions in used range. MBR partition tools that doesn't know about GPT uses first sector when GPT resides at end of disk.

I maybe wrong below:
- you need GPT for EFI install. After that you create normal MBR and install.
- now parted detects presence of GPT records (from EFI install) at end of disk and regular (not protective) MBR in boot sector, so shows the warning.

Last edited by bormant; 07-14-2016 at 12:43 AM.
 
Old 07-13-2016, 11:59 AM   #3
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Please post the output of
Code:
cat /proc/mdstat

I think almost all filesystems support open_excl. Could the problem be due to permissions?
 
Old 07-13-2016, 01:00 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
If you're using gpt (which, based on your output, you are), you can't use fdisk anymore as it doesn't support gpt partitions. Try using gdisk, as it is a gpt version of fdisk. It's pretty similar to fdisk and you shouldn't have problems getting used to it.

Also, when you post your console output, please encase it in [code][/code] tags to facilitate easier reading.
 
Old 07-13-2016, 06:25 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
@bormant is close - the problem is that an EFI header was left behind and fdisk is seeing that. I simply zero'd sector 2 with dd.
I haven't looked at lilo in over 10 years, so I'll leave that to others as to what effect zapping that sector might have. Try this to check that sector
Code:
sudo dd if=/dev/sda count=1 skip=1 | strings
FWIW current fdisk does now support gpt, and has for a while.
 
Old 07-14-2016, 04:10 AM   #6
thenob
LQ Newbie
 
Registered: Feb 2009
Posts: 14

Original Poster
Rep: Reputation: 4
@bassmadrigal
The problem suddenly appeared just once after months without a problem.
It was qmail-send that couldn't create a file on disk.
It happened at a very quite time (at night, no backup or whatso-ever was running), and after qmail-restart everything was fine again.
I'm trying with the maintainer of the package to solve the problem, and he asked me to mount the qmail-queue synchronous.
That's when I bumped to this MBR-problem


@bormant:
EFI was tried but failed to install with the slackware USB-stick, so it was skipped and tried with normal install.


@syg00:
I think your right (EFI header is left behind).
Code:
~# sudo dd if=/dev/sdb count=1 skip=1 | strings
EFI PART
��B%
1+0 records in
1+0 records out
pC��բ���
512 bytes (512 B) copied, 9.9175e-05 s, 5.2 MB/s
Should I clear this, as said on: http://www.rodsbooks.com/gdisk/wipegpt.html
And what about the first cylinders?
parted says it's first partition is 105 MB boot,
fdisk doesn't see that, it's first partition starts at cylinder 2048
Also note that parted says: "Partition Table: gpt"


For the records my outputs of sda (both sda/sdb have this "problem")
Code:
~# gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.7

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
Code:
~# fdisk -l /dev/sdb
Welcome to fdisk (util-linux 2.21.2).

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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 identifier: 0x3a68aa11

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     8390655     4194304   82  Linux swap
/dev/sdb2         8390656   134219775    62914560   fd  Linux raid autodetect
/dev/sdb3       134219776   553650175   209715200   fd  Linux raid autodetect
Code:
~# parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Warning: /dev/sdb contains GPT signatures, indicating that it has a GPT table.  However, it does not have a valid fake msdos partition table,
as it should.  Perhaps it was corrupted -- possibly by a program that doesn't understand GPT partition tables.  Or perhaps you deleted the GPT
table, and are now using an msdos partition table.  Is this a GPT partition table?
Yes/No?
Model: ATA WDC WD3202ABYS-0 (scsi)
Disk /dev/sdb: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      20.5kB  105MB   105MB                         boot
 2      105MB   4400MB  4295MB  linux-swap(v1)
 3      4400MB  68.8GB  64.4GB                        raid
 4      68.8GB  284GB   215GB                         raid
Code:
~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] 
md1 : active raid1 sda3[0] sdb3[1]
      209715136 blocks [2/2] [UU]
      
md0 : active raid1 sda2[0] sdb2[1]
      62914496 blocks [2/2] [UU]
 
Old 12-01-2016, 05:23 PM   #7
thenob
LQ Newbie
 
Registered: Feb 2009
Posts: 14

Original Poster
Rep: Reputation: 4
[Solved] MBR screwed

Solved it by deleting the leftover GPT data with the command
Code:
sgdisk --zap /dev/sda
 
1 members found this post helpful.
Old 12-26-2016, 12:05 AM   #8
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 779
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Please mark this thread as solved, so people who want to help you, don't read all of it, just to discover that you don't need help any longer.
 
  


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
Screwed up my MBR spyke100 Linux - Newbie 18 02-16-2013 05:29 AM
Screwed up the mbr of Windows install! need help? Nabeel Linux - Newbie 6 02-15-2013 12:14 PM
Suse 10.1 has screwed up my MBR d_GeNeRiT SUSE / openSUSE 2 10-12-2006 09:59 PM
really screwed MBR jimmywithtorch Linux - Software 4 03-15-2004 03:34 AM
screwed up mbr hooligan Linux - Software 5 10-17-2001 12:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

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