Current-Users archive

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

Re: NetBSD on Gateway SX2185?



Le 27/07/2014 15:43, Paul Goyette a écrit :
Not necessarily: if the BIOS supports legacy mode, Grub can see USB
plugged disks/keys like normal HDDs. Passing down another root to Grub
to boot from it is rather easy:

set root=(hd1,1,a) # Depends on how your disk is detected by Grub
chainloader +1
boot

I'm not sure what you are suggesting here...  (I've never used grub, so
have zero familiarity).

No problem. I am suggesting a boot from a Grub CD (Ubuntu/Debian install CD/DVD) with a USB disk (or key) plugged that contains a NetBSD bootdisk obtained this way:

https://wiki.netbsd.org/tutorials/how_to_install_netbsd_from_an_usb_memory_stick/

Then ask the booted Grub to chain load to the USB disk. Usually this works well for systems that manage to boot with Grub but fail to do so with NetBSD's own bootloader or those that cannot boot directly from a USB key.

I don't have a USB hard-drive, so I tried this:

Then this will not work :/

I booted grub from the Ubuntu disk and entered "C" for command mode.

I then entered the "set root=(hd0,0,a)" command (at this point, hd0
still refers to the Windows hard drive).

I then entered the "chainloader +1" command, and it responds with

     error: disk `hd0,0,a' not found

I tried the "boot" command next, and it told me that I need to load a
kernel first.

Yup. "error: disk" means that it failed to lookup the partition you specified. Usually Grub syntax acts this way:

- traditional MBR partitions will be identified like (hd0,0), (hd0,1)... this corresponds to /dev/sda1 or /dev/sda2 under Linux;

- BSD slices are a bit more tedious because the slices are contained within a MBR partition themselves. Grub auto detects this and prints them like (hd0,0,a), (hd0,0,b)... with hd0,0 representing the MBR partition that contains the BSD slices, and a,b,c ... the slices declared within.

To sum it up, for (hdX,Y,Z)

hd => hard-disk
X  => hard-disk identifier as seen by BIOS
Y  => partition Y from MBR (primary or extended
Z  => (optional) slice identifier, used for BSD systems

IIRC "Z" only shows up when Grub detects a disklabel within "Y".

In your case the simplest way is to TAB-complete in the Grub shell. Normally it should propose multiple choices:

    set root=(hd<TAB><TAB>)

should list different options. Then attempting "ls /" (still from Grub shell) will show you what it sees at root).

It used to work with "older", non-UEFI machine. With todays RST, UEFI
and SecureBoot, it does not work as easily. But might be worth a try.
This assumes that you can have a CD/DVD boot disk + USB disk connected
to the station.

BIOS configuration may also provide an option to boot "legacy" or
"UEFI", with UEFI being often enabled by default. Do you have access
to BIOS/EFI configuration menus?

BIOS configuration section "Boot Options" allows me to select the "Boot
priority order" - here it lists

     1st Boot Device        Windows Boot Manager
     2nd Boot Device        UEFI: HL-DT-ST-DVDR...
     3rd Boot Device        Removeable device
     4th Boot Device        LAN

It then provides four sub-menus for selecting Hard Disk, Optical Disk,
Removeable Device, and Network Device priorities.

Finally there are entries to Enable/Disable "Boot Menu (F12)", "D2D
Recovery (F10)", "Fast Boot", and "Quiet Boot", and the usual "Halt on"
selection (currently set to "Allbut Keyboard").

That's it.  Nothing about UEFI or Legacy.

Was worth a try.

--
Jean-Yves Migeon


Home | Main Index | Thread Index | Old Index