help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grub2 on USB-Stick fails install


From: Neal Murphy
Subject: Re: Grub2 on USB-Stick fails install
Date: Wed, 14 Dec 2011 15:04:24 -0500
User-agent: KMail/1.13.5 (Linux/2.6.32-5-686-bigmem; KDE/4.4.5; i686; ; )

On Wednesday 14 December 2011 14:28:53 Oliver Friedrich wrote:
> On 13.12.2011 21:12, Jordan Uggla wrote:
> > On Tue, Dec 13, 2011 at 10:18 AM, Oliver Friedrich<address@hidden>  
wrote:
> >> address@hidden:~$ sudo LANG=C parted -l
> >> Model: Generic STORAGE DEVICE (scsi)
> >> Disk /dev/sdb: 32.1GB
> >> Sector size (logical/physical): 512B/512B
> >> Partition Table: msdos
> >> 
> >> Number  Start   End     Size    Type     File system  Flags
> >> 
> >>   1      1049kB  32.1GB  32.1GB  primary  fat32
> >  
> >  From that, it doesn't look like you have multiple partition tables,
> > 
> > but you may have stale fat signatures (from previously putting a fat32
> > filesystem on the whole device, without any partition table) which
> > grub-install is seeing. When grub-install sees what looks like both a
> > partition table and a filesystem it can't be sure that it's safe to
> > embed grub. There is probably a subtler and less destructive way to
> > remove just the fat signatures, but if you don't mind losing the data
> > currently on the drive then running "dd if=/dev/zero of=/dev/sdb bs=1M
> > count=1" will zero the first MiB of the drive, *destroying the current
> > partition table and making all files on the drive currently
> > inaccessible*. After zeroing the first MiB of the drive you should be
> > able to partition it again and install grub without any problem.
> 
> Did follow your proposal with:
> 
> dd if=/dev/zero of=/dev/sdb bs=1M
> count=1
> 
> 
> and then made the filesystem directly on the device with:
> 
> /mkfs.msdos -I -F 32 -n BeowulfOF /dev/sdb/
> 
> 
> Anyway, the error message is still the same if I try to install grub with:
> 
> /grub-install --force --no-floppy --boot-directory=/media/BeowulfOF/boot
> /dev/sdc/

You worked with /dev/sdb, then tried to install grub to /dev/sdc? That 
oughtn't work.

Here's a bit of script that should illustrate the manual steps:
------------------
# Target device
USBdev=/dev/sdb

# Clear the disk of partition info and initial FS info
dd if=/dev/zero of=$USBdev bs=1M count=1

# Make a new FAT FS on the drive without partition table
mkfs.msdos -I -F 32 -n BeowulfOF $USBdev

# Mount it, so the boot directory is accessible
mount -t vfat $USBdev /media/BeowulfOF

# Install grub
grub-install --force --no-floppy \
    --boot-directory=/media/BeowulfOF/boot $USBdev

# Unmount it
umount $USBdev
------------------
You may need to add paths to the commands above.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]