Visit The New, Modern Unix Linux Community

2nd hdd is Linux_lvm can't mount MBR on BSD with GPT

Thread Tools Search this Thread
Homework and Emergencies Emergency UNIX and Linux Support 2nd hdd is Linux_lvm can't mount MBR on BSD with GPT
# 1  
2nd hdd is Linux_lvm can't mount MBR on BSD with GPT

rying it this way, because I can't handle the slices for the second hdd. If there is someone on this forum who can help me out of that misery, he would really save my digital life in this digital ocean.

So not giving up, reading several times the manual of gpart. But the best hint in all that was to create a second boot-sector on the the 2nd hdd or even replace the MBR which is there. In other words, the boot-disk has got a GPT boot partition, that probably will only communicate with another hdd that works as well with the GPT. But my second disk has got a MBR.
This would mean (as far as I understood the whole /boot folder) to manipulate the loader.conf.pcbsd which I already did once and ended up in a /etc/fstab with another line that froze all rebooting. Not to write anything into the loader.conf file and nothing in the loader.conf.pcbsd.
I tried several times to add on the GUI (using Mate-Desktop) the widget to perform the adding of another slice on the second disk. The file format proposed there was linux-lvm. But this did not work at all. The disk is there, but I can't access it.
The only thing I removed from the fresh installation was in


. So please think whatever you want about the removal of sudo, but I got a better experience without it.
So posting here the output for
 gpart show 
=>       34  976773101  ada0  GPT  (466G)
         34       2048     1  bios-boot  (1.0M)
       2082          6        - free -  (3.0K)
       2088  972558336     2  freebsd-zfs  (464G)
  972560424    4194304     3  freebsd-swap  (2.0G)
  976754728      18407        - free -  (9.0M)

=>        63  1953525105  ada1  MBR  (932G)
          63        1985        - free -  (993K)
        2048  1953521664     1  linux-lvm  (932G)
  1953523712        1456        - free -  (728K)

=>      1  1888767  da0  MBR  (3.6G)
        1       14       - free -  (28K)
       15  1888753    1  fat32  (3.6G)

Looking up in /boot the kernel module for

is there. As well looking up in

The next best thing or the closest I came to add another slice to the second disk, and another boot sector was the following.
#gpart create -s GPT ada1
#gpart add    -t freebsd-ufs -a 1 ada1

This last one I did. Nothing happens to mount the device or slice.

By chance there is the GUI of KDE to look at the slices of the 2nd hdd, that tells me
first slice is free, starting at sector 63 ending at sector 1985, as shown above, and as well another free slice that starts at 2048. Both free slices have got a size about 992 KB the first and the second about 728KB.
So reading again and again even writing it down to understand it, I learned that there should be another GPT slice on the second disk replacing the MBR record. But any time I try so to slice the first entry to be or freebsd, linux-lvm or even linux-data I can't mount it due to an invalid argument.
Quote "An error was detected while executing 'mount': /dev/ada1s1 Invalid argument. Trying to mount it on "/" or the only user.

so, if by chance there is some expert of this who can help me I'd really gladfully appreciate it . Loads of thanks in advance, if someone has mercy on me.

After reading and searching a while I got this far >

Step one: using gparted on another linux machine deleting and formatting the usb-key with the late debian-boot and live system on. Putting this newly formatted usb-key into the bsd machine I still see three slices, just like it would be a bsd scheme. There is even the iso-name and the hash-key as name of the stripe. I did not work with gparted to format this usb-key as one volume. There are three devices remaining.
Step two: reading in wiki, linux is crawling under the hood of bsd and using the kernel. Using bsd GEOM means to mount a RAID 0. But I never intended do use a raid something, nor RAID 0 or RAID 1 or 5. But it is installed to speed things up, on a one disk machine. Great, I always yearned for that. And by the way beeing a software raid, it is slowing down the cpu speed for very simple file transfers, jampacking the bus.
Step three: URE (unrecoverable read error), the different size of arrays may cause some problems when two different disks or more have to work whith each other. Depending of the usage, the type and the age of your disk, your next update or upgrade can be a real challenge. It does not matter what linux or unix you will use. You will get a RAID 0 without beeing asked.
Step four: onboard tools just like LVM will help me to take control of the size of the device. Well, I still struggle to do so.
Step five: The FreeBSD Project is telling about this topic, how to manipulate the

to mount automatically the 2nd hdd on booting up like this

# mkdir /stripe
# echo "/dev/stripe/st0a /stripe ufs rw 2 2" \ 
    >> /etc/fstab

in my case it would replace the MBR on the second hdd with GPT and a the same time changing the linux_lvm to ufs.

and to

 # echo 'geom_stripe_load="YES"' >> /boot/loader.conf

That includes the
geom_stripe.ko module is loaded. Have a call at your local kernel bakery. It is loaded.
If nothing else works, there is a workaround to undo your fatal erros, to recover the data, which I doubt.
Step six: I may recover the data via an external usb-hdd on another machine and create a new partition. This implies I'd rather work with that small boot-disk and several external usb-hdd to avoid that fuss. As if way back, the floppy and CD is beeing replaced by external usb-hdd.

Step seven: using the usb-key to copy files takes a long long time, just 200 MB or 6 GB, from the disk to the key and vice versa. Caja gives me time for a walk, on a dual-core laptop, quad-core Desktop, anyway. Never before I have seen something that slow on any older machine with less RAM or a slower CPU. Beside it is no help to wipe out gvfsd-metadata. Things are going very slow.
I am hoping to save some content before doing something wrong beeing blocked after adding a line to /etc/fstab
Step eight: adding a line to rc.conf

and rebooting makes it really slow to reboot. Still the 2nd hdd is out of reach, I can't access it.
Step eight: adding

to /boot/loader.conf
Step nine: waiting a while to reboot and daring to add a line to the fstab file. The very one mentioned above. This will take more time, because file transfers back and forth is really slow, using a single usb-key. And I don't want to loose some fresh 50GB again.

My good old notch external hdd saved my data, much faster than the usb-key. I never saw any usb-key transferring data at 230 kB/s. Until now I tried any other hint, but not daring to mess around with /etc/fstab again.
As follows the commands that did not help, even coming from 17.2.*Adding Disks
# gpart create -s GPT ada1
gpart: geom 'ada1': File exists

(I know, should I create ada2?)

# gpart add -t freebsd-ufs -a 1M ada1
gpart: size '0': Invalid argument

( so what size else?)

newfs -U /dev/ada1p1
newfs: /dev/ada1p1: could not find special device

following the last step on this page, I am sure to end up reinstalling it all over again. Being up and down, from dusk to dawn, looking all the commands and hints that can be found (wrong magic number 0 (expecting 00xef53), looking for bad blocks, using fsck which of course doesn't work, because the device is not there to be seen or can not be accessed. Tried also

diskinfo -ctv ada1
gpart set -a active /dev/ada1 
    operation not supported by device
gpart set -a bootme -i 1 /dev/ada1
    invalid argument

So the very last step, with little hope to succeed is to change the

#mkdir /stripe
#echo "/dev/stripe/ada1s1  /stripe/ufs rw 2 2 " \ >> /etc/fstab

So wish me luck, the moment of truth has come to reboot.
like this as seen on

Befort rebooting I added the following line

gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada1

followed by
bootcode written to ada1

After rebooting I do not even see now what is going on.
But the /etc/fstab remains the same, beside this I had to fuddle around in the boot menu which way to start, single user, verbose, or something like post-installing. Now the 2nd hdd is seen as a SCSI device, unknown and three slashes as a location, thats wrong. It is a SATA2 disk. And it is still out of reach. When trying to do this in the GUI of Systemcontrol to mount the second disk on the mountpoint /home/username
I am told there was an error detected
while executing 'mount' /dev/ada1s1: invalid argument

Nice. Very nice.

linux-lvm and zfs don't work together, ext. hdd helped.
So after losing already the content, I solved it via the external hdd installing the system many times over and over again, lets say, the hard way, on the first physical hdd. But it did not work to mount the second internal hdd. So I changed it to mount the system on the physical second hdd and by chance GRUB remained on the old first one. This means by booting it, I need to change the boot sequence every time in the BIOS, but now I can access the second hdd as root. All done without even having added one bit to /etc/fstb and reading about this recently solved problem on both sides, the GNU-Project and ZFS licence problems.

Last edited by 1in10; 05-22-2016 at 04:17 AM.. Reason: [solved] linux-lvm and zfs don't work together, ext. hdd helped and GRUB on the new old one

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #752
Difficulty: Medium
BIOS is an acronym for Bootstrap Input/Output System.
True or False?

10 More Discussions You Might Find Interesting

1. Fedora

Fstab for 2nd hdd, how to?

once again, mounting another volume or hdd the fstab-file is giving me a headache. May someone could give me a hint how to configure the fstab-file properly to use the hdd. The following ls -l /dev/disk/by-uuidis giving me this Thats the UUID for /dev/sdb1 with the name "save"... (6 Replies)
Discussion started by: 1in10
6 Replies

2. Solaris

How to mount ntfs for storage HDD new to Solaris 11.2?

I just installed Solaris 11.2 - and it is a bugger. How do I mount an extra HDD that is now formated to NTFS through gparted it keeps telling me I don't have any ntfs on this laptop. it has two hdds, /dev/sda1 /dev/sdb1 (Linux lingo) Solaris is installed on primary hard drive back of it. then... (2 Replies)
Discussion started by: userx-bw
2 Replies

3. SCO

Dd (raw) image of SCO 5.0.6 mount as second hdd

Hi all I have read about mounting crashed HDD from a sco system in this forum. However this I received an image on raw format of the crashed system that was using an IDE HDD. Which method should I mount my image? IDE scsi or USB? The image is stores in an external connected through USB . Also... (4 Replies)
Discussion started by: OrangeKenny
4 Replies

4. Fedora

Disk Paritioning Scheme--GPT or MBR

Hi, I just built myself a new machine which has an ASUS motherboard with is UEFI based. I noticed after I installed Fedora 17 that my sda is MBR and my sdb is GPT: sda is a ssd drive. Should the ssd drive be GPT or is MBR okay? sda is 60Gb drive. (3 Replies)
Discussion started by: mojoman
3 Replies

5. Boot Loaders

GPT/Protective MBR problem...

Hi, short thing: I've done something I didn't know what happens; bad thing: I did it with my partition table. :D My OS is Ubuntu 10.10. I've used GPT and now want to convert it to MBR with gdisk. I started gdisk, chose 'r' for "transformation options" and chose 'g' to "convert GPT into MBR... (3 Replies)
Discussion started by: Blackbird
3 Replies

6. Filesystems, Disks and Memory

How to mount and read vintage scsi HDD

I started on another thread and full story can be seen here: But my situation turned to land on this thread now. I have old scsi HDD out of the UHC UNIX System V Rel. 4.0 Version 3.6 box. And need to read... (1 Reply)
Discussion started by: 82026
1 Replies

7. SCO

Sco 5.06 How To Mount A 2nd Hdd Help Help!!!!

Hi guys, I have this problem , One of our client's hdd went down and we cannot boot up the machine , I've installed a new hdd with a fresh copy of SCO 5.0.6 same as the one in the old HDD, i think the data still good in the old HDD. My question!!! How can i access the data from the fresh... (4 Replies)
Discussion started by: josramon
4 Replies

8. Windows & DOS: Issues & Discussions

NFS HDD mount on Windows XP

Hi, Unix based, My harddrive won't boot and I'm looking for a reliable tool that can mount a hdd on Windows XP and show me the files stored on a NFS system. I tried the tool: Ext2IFS but this didn't work. I found a lot of tools on google to mount nfs share thru a network but that's... (1 Reply)
Discussion started by: severt
1 Replies

9. Solaris

How to mount External HDD in VMware 6.0

Hi Friends, I am using VMware 6.0 and i want to transfer some files from External HDD so how to mount the Disk, and i am not able to assign any ip to my network card any one can help me how to set ip in VMware. Thanks and Regards, Venky.:b: (0 Replies)
Discussion started by: 1409.venkatesh
0 Replies

10. UNIX for Dummies Questions & Answers

dual boot solaris off of 2nd HDD

I did a search on the board, but I could not find anything specific to dual booting windows and solaris, with solaris being placed on a second hard drive. I have solaris 8 intel, and I am trying to dual boot, but the Solaris installation process is quite intimidating. I am afraid I am going to do... (3 Replies)
Discussion started by: dangral
3 Replies

Featured Tech Videos