Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
UEFI install on Dell XPS 8500
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
aplesch
n00b
n00b


Joined: 26 Feb 2004
Posts: 70

PostPosted: Tue Apr 30, 2013 9:00 pm    Post subject: UEFI install on Dell XPS 8500 Reply with quote

Log of installation for documentation and issues

1) Hardware

32GB Ram

/dev/sda 2 TB hard disk
/dev/sdb 256 GB SSD
1 empty HD slot
1 empty optical drive slot (could be converted to HD space)

/dev/sdb1 is 500MB FAT32 EFI partition

BIOS Aptios 2.15.1226 (American Megatrends): EFI capable, secure boot can be disabled, no way to select efi from file for an efi shell (Dell restriction since it is there on ASUS I believe); has legacy (BIOS) mode as fallback

F2 gets into firmware
F12 gets into tool selection (a kind of alternative BIOS interface, EFI related ?); includes Dell hardware diagnostics which seem useful

2) Strategy

- use EFI because need to learn it, and "better"
- potential to avoid boot manager entirely
- try to use linux stub loader directly from firmware with boot options passed in efivar
- if not, use grub2 though seems complex
- test to see if firmware allows more than one boot manager on the same drive

3) EFI

reading:
http://www.rodsbooks.com/efi-bootloaders/index.html
http://blog.realcomputerguy.com/2012/05/efi-stub-booting-without-bootloader.html?m=1
http://xtothei.wordpress.com/2012/05/08/gentoo-uefi/
https://wiki.archlinux.org/index.php/UEFI_Bootloaders

Sysrescuecd boots in EFI mode but efibootmgr does not work (dmesg reports malformed variables and error codes)
Fedora 18 live CD boots in EFI and efibootmgr does work -> use it on USB stick
Aptios firmware seems a bit limited:
It will just keep one entry for each HD device even after two valid boot entries were defined with efibootmgr and added to the boot order. The firmware just deletes all except one for each device from NVRAM.
That means that it is not possible to keep older kernels in the bootorder in NVRAM (but still of course on the EFI partition). In order to boot into older kernels one must first use efibootmgr to make it the only boot entry for the SSD. So, if new kernel does not boot, one has to go back to USB live distro (Fedora 18), and use efibootmgr from there. Acceptable.

3) partitioning

/dev/sda1 32 GB swap
/dev/sda2 2 TB ext4 /home
/dev/sdb1 500 MB fat32 /boot/efi (exists)
/dev/sdb2 40 MB fat32 buffer (perhaps ext2 /boot) (exists)
/dev/sdb3 134 MB MS reserved partition, leave alone (perhaps merge later with sdb2) (exists, no fs)
/dev/sdb4 254GB ext4 root (/usr /var /lib ...)

tmpfs for /tmp /var/tmp
check if existing /dev/sdb4 starts on 2048n sector boundary: it does

use discard mount option (?)

4) backing up original

- used dell system recovery to create recovery DVDs (3)
- are bootable
I happened to delete all partitions on SSD after trying to feed back a save partition table in gdisk. The recovery DVD then restored MS OS system on HDD (!), not SSD.
After physically disconnecting the HDD, the recovery DVD restored system to factory state on SSD including EFI partition.
F12 -> Diagnostics still works even after removing OS and recovery partitions (sdb4-6)

5) Installation

- partitioning + assigning PARTLABELS
- follow handbook http://xtothei.wordpress.com/2012/05/08/gentoo-uefi/
- chroot worked
- kernel configuration: not sure what is required for fan control and temperature sensing, found realtek ethernet and atheros wifi modules

- fstab: use PARTLABEL because
- persistent with rearrangement of drives
- persistent with change of filesystem
spaces in PARTLABEL name as \040 (no quotes allowed in fstab)

efibootmgr -c -d /dev/sdb -p 1 -L "linux 3.7.10-gentoo-r1" -l \\EFI\\Gentoo\\BOOT\\kernel-3.7.10-gentoo-r1.efi -u root=PARTLABEL=SSD_230GB

did not work because "kernel-3.7.10-gentoo-r1.efi" is too long; bootx64.efi works

PARTLABEL did not work but PARTUUID worked: look up with gdisk or blkid

However, rootfs then listed twice in df output; do not think this indicates a problem.

ethernet network interface name not eth0 anymore but seemingly constructed from something ? look up in /sys/class ...

see http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames

so enp3s0 means:

en: ethernet
p3s0: PCI geographical location p<bus>s<slot> bus number 3 slot number 0



6) Setup

could reuse make.conf, with updated CFLAGS for core I7
could reuse package.use and package.keywords (now package.accept_keywords)
could reuse world file (after some pruning)

first did an emerge --with-bdeps=y --newuse world with empty world, but long USE variable and package.use and .keywords in place, and after emerge --sync:

emerged 330 or so packages

Then did a full
emerge -vuDt --with-bdeps=y --newuse world with populated world file:

emerged some 700 packages

nvidia:

want to use nvidia driver rather than nouveau:
had compiled nouveau as a kernel module, is picked up automatically during boot
blacklisting nouveau prevents it from being loaded but then no X since xorg does not find nvidia module automatically
adding "nvidia" as driver in xorg.conf makes X then work, xorg.conf otherwise empty.
tested nouveau as well, 3d quite usable

kde:

wants dbus service but is not started by default
rc-update add dbus default ok.

consolekit: not sure if really needed.

want to use Python based plasma widgets
did not work first because there was no python-script-engine
needs "python" in USE
after reemerging with --changed-use ok

hardware monitoring, lmsensors:

sensors-detect picks up coretemp and others
main super i/o chip is ITE it8772, not supported in kernel but with standalone version of it87 driver
replaced it87.c in kernel source with standalone, reconfigured kernel to add as module, make modules
Then modprobe does not load it87 module because acpi resource/address is already claimed/used probably by bios
needs
acpi_enforce_resources=lax
as kernel parameters (considered somewhat unsafe)
add with efibootmgr, reboot, it87 module then loads:
provides good fan speeds although fan0 rpm is 0 (perhaps it is actually turned off)
temperatures are off, incorrectly scaled
voltages may be ok (3V) but are outside default range

7) Data transfer

Did not want to install disk from old PC into new PC although probably easiest.

But network peculiar:

- no ssh in allowed
- ssh out to central login server allowed
- only ssh port (22) open
-> need to use mind bending tunnels

-> establish ssh tunnel for ssh to new PC (from server) on new PC
newPC$ ssh -f -R 55555:localhost:22 myuser@login.server.org sleep 600d
socket on server now listens to 55555; sshd uses tunnel to ssh out on port 22

-> establish sshforwarding on oldPC
oldPC$ ssh -f -L 44444:localhost:55555 myuser@login.server.org sleep 599d"
socket on oldPC now listens to 44444; sshd uses tunnel to forward as 55555 on server

-> use rsync with custom ssh shell options from old PC:
oldPC$
rsync --rsync-path=/usr/bin/rsync -e "ssh -p 44444" -a -v -H -u -b --suffix .RSYNC-`date +%Y%m%d-%T` --exclude '*~' --exclud
e '*.RSYNC*' dir_to_transfer newPC_user@localhost:destination_dir

(rsync options from back-up script but do not hurt)
Back to top
View user's profile Send private message
aplesch
n00b
n00b


Joined: 26 Feb 2004
Posts: 70

PostPosted: Wed Oct 02, 2013 8:29 pm    Post subject: more uefi info Reply with quote

dmidecode info:

BIOS Information
Vendor: Dell Inc.
Version: A10
Release Date: 10/19/2012
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 4096 kB
Characteristics:
PCI is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
BIOS ROM is socketed
EDD is supported
5.25"/1.2 MB floppy services are supported (int 13h)
3.5"/720 kB floppy services are supported (int 13h)
3.5"/2.88 MB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Targeted content distribution is supported
UEFI is supported
BIOS Revision: 4.6

There is a A11 available but does not appear to have EFI shell or multiple boots per device.

There are BIOS editing tools (AMIBFC) but obviously dangerous(non working bios -> replace mb)

Looked at rEFInd and has advantage of easy dual booting choices and having to use efibootmgr when updating kernel. But adds another piece and did not pickup my kernel automatically -> fiddling with .conf.
_________________
Andreas
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Thu Oct 03, 2013 1:02 am    Post subject: Reply with quote

are you intending to dual boot windows and gentoo?
If so, I wrote https://wiki.gentoo.org/wiki/UEFI_Dual_boot_with_Windows_7/8 after days wrestling with an ami bios 1.90 with aptio uefi (mine was an asrock MB). When windows is present the ami bios and aptio uefi became a guided missile homing on windows. Anything done with efibootmgr either vanished or had no effect. sysresccd appeared in refind after refind was installed using windows bcdedit . My wiki article was written specifically as though the user had a laptop with windows 7/8 preinstalled. I actually performed that install. After that I removed it and reclaimed that whole ssd (/dev/sda) for windows and offloaded 'documents and settings' (as we used to call it) to a hard drive. Then booted sysresccd via refind and installed gentoo to another ssd offloading the frequently written directories to a hard drive.

IIRC efi stub kernel and efibootmgr worked quite well before windows arrived.

I did concede to windows which still wants the first partitions on the first hard drive, windows 8 took /dev/sda1 through /dev/sda4.
In another install using the same procedure on an asus MB, windows 7 took /dev/sda1 through /dev/sda3, gentoo on /dev/sda4. Both OS's remain on the same ssd.
Point being: more flexibility is available than shown in the wiki.

The stub kernel needs an l or L in its name and needs to reside on an ext or reiser3 or fat file system.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum