-
-
Save leoheck/c44e2167f0c90f56342aed3ba4299670 to your computer and use it in GitHub Desktop.
# | |
# Run this from the Live USB. | |
# | |
############################# | |
# EDIT YOUR PARTITIONS HERE # | |
############################# | |
root_partition=/dev/nvm0n1p2 | |
sudo mount ${root_partition} /mnt | |
sudo mount --bind /dev /mnt/dev | |
sudo mount --bind /proc /mnt/proc | |
sudo mount --bind /sys /mnt/sys | |
sudo mount --bind /usr/ /mnt/usr | |
# Enable internet on chroot | |
sudo ln -s /etc/resolv.conf /mnt/etc/resolv.conf | |
sudo chroot /mnt | |
# | |
# INSIDE THE CROOT | |
# | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install intel-microcode | |
sudo apt install nvidia-driver-390 | |
# UPDATE KERNEL | |
# http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D | |
cd /tmp | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19-rc8/linux-headers-4.19.0-041900rc8_4.19.0-041900rc8.201810150631_all.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19-rc8/linux-headers-4.19.0-041900rc8-generic_4.19.0-041900rc8.201810150631_amd64.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19-rc8/linux-headers-4.19.0-041900rc8-lowlatency_4.19.0-041900rc8.201810150631_amd64.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19-rc8/linux-image-unsigned-4.19.0-041900rc8-generic_4.19.0-041900rc8.201810150631_amd64.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19-rc8/linux-image-unsigned-4.19.0-041900rc8-lowlatency_4.19.0-041900rc8.201810150631_amd64.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19-rc8/linux-modules-4.19.0-041900rc8-generic_4.19.0-041900rc8.201810150631_amd64.deb | |
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19-rc8/linux-modules-4.19.0-041900rc8-lowlatency_4.19.0-041900rc8.201810150631_amd64.deb | |
dpkg -i *.deb | |
# FIX INTEL i915 | |
echo "options i915 enable_psr=0" > /etc/modprobe.d/i915.conf | |
exit | |
reboot |
Yes, it was a typo, good catch. Did it work for you?
hey @leoheck, working on it since yesterday - i had cpu stuck cores when booting straight to installed os, and so after that i tried this
- first interesting thing is that you have /dev/nvm0n1p2 and i have /dev/nvme0n1p2, i dint know it could vary :D
- i have following fail
ln: failed to create symbolic link '/mnt/etc/resolv.conf': File exists
, no clue what's the problem here - bigger problem is when you chroot, script does not execure there, it just hangs, when you exit it by ctrl+d, script contitues executing in shell with my user
- even though if i try to run commands manually in chroot, i'm not connected, i can't even ping google
my questions:
- how to create the symlink so it does not fail?
- how to execute the rest?
ok, after some digging:
you can create internet connection by conpiing the file instead of creating symlink sudo cp /etc/resolv.conf /mnt/etc/resolv.conf
then i guess i have to create new sh script under chroot and execute it
ok, so after some time I made it - this is not a script, it's better to run it row by row. I think I didn't install intel and nvidia, and unsigned images of the kernel also didn't install. It's possible I mounted more folders like /usr etc.
after this by pressing escape during boot (during dell logo is displayed but before ubuntu loads) you get to grub "menu". be aware that you can't rape the key, otherwise you'll end up in grub "shell". now press e
and edit the GRUB_CMDLINE_LINUX_DEFAULT=
row to following: https://imgur.com/a/0RcK1Jz
after that, press ctrl+x to boot. it should be more stable, and you might need to edit grubfile.
@see https://www.reddit.com/r/Dell/comments/9puckt/ubuntu_1810_on_dell_xps_15_9570/
hey @leohack, are you sure the gpu is enabled?
I've tried multiple drivers, 390, 410, some older - and I'm never able to make it work.
$ nvidia-settings
ERROR: NVIDIA driver is not loaded
ERROR: Unable to load info from any available system
$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
$ inxi -G
Graphics: Device-1: Intel driver: i915 v: kernel
Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] driver: N/A
Display: x11 server: X.Org 1.20.1 driver: N/A resolution: 1920x1080~60Hz
OpenGL: renderer: Mesa DRI Intel HD Graphics 630 (Kaby Lake GT2) v: 4.5 Mesa 18.2.2
$ sudo lshw -C display
*-display UNCLAIMED
description: 3D controller
product: GP107M [GeForce GTX 1050 Mobile]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: latency=0
resources: memory:ec000000-ecffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:ed000000-ed07ffff
*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 04
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:140 memory:eb000000-ebffffff memory:80000000-8fffffff ioport:f000(size=64) memory:c0000-dffff
based on this, I'm not nure if nvidia works. could you please send your output of these?
and your /etc/default/grub
would be also appreciated
Notes:
- My root partition was "/dev/nvme0n1p2", not "/dev/nvm0n1p2"
- Had to follow https://unix.stackexchange.com/a/339621 in order to boot the root partition (I used LVM during install)
- Had to copy "/etc/resolv.conf" instead of linking it since it already existed
You don't need to do all this procedure, just press "e" when on ubuntu boot menu (can be the live installation media) and add nouveau.modeset=0 to your kernel options. It is this open source reverse engineered drives that causes all sort of trouble.
You don't need to update kernel to 4.19, it works perfectly fine with 4.18 that comes with ubuntu 18.10 as well. After installing ubuntu, again on boot screen ensure to disable nouveau and if you wish later you can install nvidia proprietary drives inside ubuntu using the update manager
Hello. Can some one help me with instruction? Who can explain me what means "Run this from the Live USB." ? I should run this when Ubuntu is already installed? And where I can change this "root_partition=/dev/nvm0n1p2" ?
Thank you!
l.29 is that a typo? I guess it should be nvidia-driver-390?
Anyways, thanks for posting this!