You are not logged in.

#1 2013-05-13 21:08:14

ubunchu
Member
Registered: 2012-05-01
Posts: 181

Install on USB, grub-install fail

Hello,
As the title sais, was following the wiki, chrooted, built the mkinitcpio and after that:

[root@ubunchu ~]# grub-install /dev/sdf
/usr/sbin/grub-bios-setup: warning: Attempting to install GRUB to a disk with multiple partition labels.  This is not supported yet..
/usr/sbin/grub-bios-setup: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-bios-setup: error: will not proceed with blocklists.
[root@ubunchu ~]# blkid
/dev/sda1: UUID="AAE8D1E4E8D1AF37" TYPE="ntfs" 
/dev/sda2: UUID="3AD8FBD6D8FB8DFF" TYPE="ntfs" 
/dev/sda3: UUID="9512c4ad-0278-4ae1-b7ab-d0c3cdd77f22" TYPE="ext4" 
/dev/sda5: LABEL="arch" UUID="ac8620a0-a56c-4d9b-9e35-fed24f9040c4" TYPE="ext4" 
/dev/sda6: LABEL="ahome" UUID="86620f75-bc54-4fa0-8dd5-550190d7c22f" TYPE="ext4" 
/dev/sda7: UUID="c63797d6-5b5b-4ba9-8558-0662f730ac06" TYPE="swap" 
/dev/sda8: UUID="b0b26847-4305-4121-a5e7-238d67f78683" TYPE="ext4" 
/dev/sda9: LABEL="quickie" UUID="87223222-c0e5-4dde-badb-f2d8a5da394d" TYPE="xfs" 
/dev/sdf1: UUID="19e22c5b-1a33-465c-bdb3-0012d2901495" TYPE="xfs" PARTUUID="97c0968f-1e4e-4b30-a3ed-16a72e4336b0" 
/dev/loop0: UUID="24f3ccd0-2f95-49a5-9df7-1632d417a3f6" TYPE="ext4" 
[root@ubunchu ~]# 

I'm guessing the problem is with the UUID and PARTUUID, how could I solve this? Gparted does not display the PARTUUID. And gdisk sais:

 gdisk /dev/sdf
GPT fdisk (gdisk) version 0.8.6
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present                                                                                                                                                                                
Found valid GPT with protective MBR; using GPT.

(I used gdisk to create a GPT partition table, since the MBR one was giving out errors, and I thought that was the problem)
Should I try with ext4? (as far as I remember, the last time it worked with XFS as well.)
Thanks in advance.
Cheers!

Last edited by ubunchu (2013-05-13 21:09:57)


Don't forget to mark as [SOLVED].

Offline

#2 2013-05-13 21:55:48

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Install on USB, grub-install fail

You are trying to install grub to a device with GPT.  Thus the area in which grub trypically writes its extra crap is full.  This area is the part between where the MBR ends and the first partition begins.  But with GPT, this is where the GPT partition table is.  It cannot use the xtra MBR space because that area is still used with GPT to create a protective MBR (and I don't think it is enough space).

This is why you need the small grub partition with no filesystem (typically 1-2MB).  See the Arch wiki page on grub.

Offline

#3 2013-05-13 22:00:20

ubunchu
Member
Registered: 2012-05-01
Posts: 181

Re: Install on USB, grub-install fail

I have set 5MB free unformatted-unused partition before that XFS partition, is that good? Or it needs to be formatted?

Last edited by ubunchu (2013-05-13 22:00:46)


Don't forget to mark as [SOLVED].

Offline

#4 2013-05-13 22:05:39

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Install on USB, grub-install fail

Did you make it an actual grub partition?  In gptfdisk it would be the type code 'ef00'.  It cannot just be some random free space, and it cannot be just any unformatted partition.

I also have some recollection that it has to be 2MB or less.  But it has been a long time since I have used grub, as I think it is far too complex for anything that I need. 

FWIW, if you are just trying to make a normal installation on a USB device, and are using all the space (not creating a multi-boot setup), it might be better to use something simpler, like syslinux.

Offline

#5 2013-05-14 03:56:43

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: Install on USB, grub-install fail

WonderWoofy wrote:

Did you make it an actual grub partition?  In gptfdisk it would be the type code 'ef00'.  It cannot just be some random free space, and it cannot be just any unformatted partition.

The gptfdisk type code for bios_grub (BIOS Boot partition) is "ef02", not "ef00" (which is for EFI System Partition).

Offline

#6 2013-05-14 03:58:36

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Install on USB, grub-install fail

Yeah, you are right, I would like to say it was a typo, but I think it was really more just mindlessness.  In any case, if you use the interactive form of gdisk, it will provide you a list of available codes upon request.

Thanks Mr. rat.

Offline

#7 2013-06-13 17:22:34

ubunchu
Member
Registered: 2012-05-01
Posts: 181

Re: Install on USB, grub-install fail

I keep bumping in the same problem again and again, and I don't seem to realize what I'm doing wrong...
I've re-formatted serveral times the whole USB again with gdisk, creating 2 partitions, the first one for grub, assigned it as ef02, and the second one as / (formatted as ext4)

/dev/sdb1: UUID="f3250364-30f5-459f-a493-282ac701070a" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="64e05202-472a-406c-b63c-d66f4627e259" 
/dev/sdb2: UUID="197989bc-3449-4b9d-99ac-9ebf55d67c83" TYPE="ext4" PARTLABEL="BIOS boot partition" PARTUUID="3e20d810-32c9-4f37-8a8a-8ce876d11935" 

note: sdb1 is the large partition, sdb2 is for grub, size: 2 MB according to gparted (also there seems to be some sort of a "problem" with sdb2, sais gparted, also it sais its formatted as ext4, and as far as i know, i did not format it)

mounted on /mnt
installed base and other programs (killed some processes which did not let me continue)
arch-chrooted into /mnt

 modprobe dm-mod
 grub-install --target=i386-pc --recheck --debug /dev/sda
...
debug stuff, yknow...
...
/usr/bin/grub-bios-setup: info: Partition 0 starts from 8192.
/usr/bin/grub-bios-setup: info: the size of hostdisk//dev/sdb is 31342592.
/usr/bin/grub-bios-setup: info: guessed root_dev `hostdisk//dev/sdb' from dir `/boot/grub/i386-pc'.
/usr/bin/grub-bios-setup: info: setting the root device to `hostdisk//dev/sdb,gpt1'.
/usr/bin/grub-bios-setup: warning: Attempting to install GRUB to a disk with multiple partition labels.  This is not supported yet..
/usr/bin/grub-bios-setup: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/bin/grub-bios-setup: error: will not proceed with blocklists.
+ exit 1

I'm trying to install it on an USB so I can then boot it on an UEFI? laptop, and install there as well.
I have installed previously on an USB, (maybe it was MBR) and I've had no problems with it.

Any hints?
Thanks in advance.
Cheers!


++Info:

Command (? for help): v

No problems found. 4061 free sectors (2.0 MiB) available in 2
segments, the largest of which is 2047 (1023.5 KiB) in size.

Command (? for help): i
Partition number (1-2): 1
Partition GUID code: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem)
Partition unique GUID: 64E05202-472A-406C-B63C-D66F4627E259
First sector: 8192 (at 4.0 MiB)
Last sector: 31342558 (at 14.9 GiB)
Partition size: 31334367 sectors (14.9 GiB)
Attribute flags: 0000000000000000
Partition name: 'Linux filesystem'

Command (? for help): i   
Partition number (1-2): 2
Partition GUID code: 21686148-6449-6E6F-744E-656564454649 (BIOS boot partition)
Partition unique GUID: 3E20D810-32C9-4F37-8A8A-8CE876D11935
First sector: 2048 (at 1024.0 KiB)
Last sector: 6144 (at 3.0 MiB)
Partition size: 4097 sectors (2.0 MiB)
Attribute flags: 0000000000000000
Partition name: 'BIOS boot partition'

Last edited by ubunchu (2013-06-13 21:26:34)


Don't forget to mark as [SOLVED].

Offline

#8 2013-08-18 13:20:03

bmanuel
Member
Registered: 2011-10-06
Posts: 106

Re: Install on USB, grub-install fail

ubunchu wrote:
 /usr/bin/grub-bios-setup: warning: Attempting to install GRUB to a disk with multiple partition labels.  This is not supported yet..

By having migrated my box's root+boot partitions to an SSD, i've experienced the same problem while installing grub to its BIOS boot partition, so what worked for me was the following:

Preparation (you could skip this step if your stick is ready with the data)
- booted from the Arch livecd
- gdisk /dev/sdb, (partitioned via gdisk, from the gptfdisk package, /dev/sdb1 is ef02 for grub, /dev/sdb2 is Linux FS
- mkfs.ext4 /dev/sdb2
- mount /dev/sdb2 /mnt
- rsync -aAXv --progress /my-system-root-dir /mnt
- rsync -aAXv --progress /my-system-boot-dir /boot

Once the system is ready, chroot into it:

- mount --bind /dev /mnt/dev
- mount --bind /proc /mnt/proc
- mount --bind /sys /mnt/sys
- chroot /mnt /bin/bash

Now it's only a matter of:

grub-install --debug --recheck /dev/sdb

Since in my case /boot was on another partition, i wanted to ensure the initial ramdisk environment was fine, so:

mkinitcpio -p linux

Then quit the chrooted env:

exit (or CTRL+D)

That should work for you too, hope it helps.

<edit>
I noticed i didn't have file capabilities set on ping/tracepath/etc.. on my usr/bin and that was due to the missing -X switch on rsync (now fixed)
</edit>

Last edited by bmanuel (2014-12-04 16:42:50)

Offline

Board footer

Powered by FluxBB