Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
SurgicalOntologist
Jun 17, 2004

I recommend at least giving ChromeOS with crouton a shot before you start from scratch. It's quite nice. Unless you're doing something that you can't do in a chroot I suppose.

Adbot
ADBOT LOVES YOU

ExcessBLarg!
Sep 1, 2001
If you mostly just use Chrome anyways, I'd second sticking with Chrome OS and using crouton to setup a chroot for stuff that Chrome OS doesn't natively support.

keyvin posted:

I like mine, but I have a lot more time than I have money so I am more than willing to futz.
So which other laptop runs Linux flawlessly? Yeah if you get a sufficiently old ThinkPad it will work with most modern desktop distributions. But I definitely had to futz around a lot back in the day to get my T61 working, and had to futz a lot with it again a few months ago when Debian switched to systemd and broke all my poo poo.

The other neat thing about Chromebooks is that they're arguably the most open hardware on the market. The source code to most of the firmware is available from the Chromium OS git repos. It even includes firmware source for the embedded controller, which is very proprietary on all other devices. Granted, making firmware modifications may be a pain in rear end and have little practical benefit, but it's refreshing to see a company go in that direction with their hardware (or rather, force OEMs to go in that direction).

CaptainSarcastic
Jul 6, 2013



ExcessBLarg! posted:

So which other laptop runs Linux flawlessly? Yeah if you get a sufficiently old ThinkPad it will work with most modern desktop distributions. But I definitely had to futz around a lot back in the day to get my T61 working, and had to futz a lot with it again a few months ago when Debian switched to systemd and broke all my poo poo.

Perhaps I have just had extremely good luck over the years, but I would find it difficult to think of a laptop that didn't work flawlessly under Linux. The only sticking point that is coming to mind at the moment is 5ghz wireless adapters, but I am used to just running wireless G anyway. Also, I guess I am assuming that you would be running proprietary drivers and such, and not insisting on a completely open source environment.

My little Acer AO722 netbook runs vastly better under Linux than it does under Windows, including with more up-to-date graphics drivers and such.

SYSV Fanfic
Sep 9, 2003

by Pragmatica

ExcessBLarg! posted:

So which other laptop runs Linux flawlessly? Yeah if you get a sufficiently old ThinkPad it will work with most modern desktop distributions. But I definitely had to futz around a lot back in the day to get my T61 working, and had to futz a lot with it again a few months ago when Debian switched to systemd and broke all my poo poo.

Up until the c720 I bought two random sub $400 laptops and everything worked right out of the box. The c7 and c720 is the first time I had to futz with *anything* since ~2007. Really since X started detecting modelines automagically and wifi manufacturers split the firmware out of their drivers I haven't had trouble installing Linux on other people's laptops either. I mean, yeah if I tried to install Debian stable on a newish laptop, it probably wouldn't be fun, but...

For the people running Crouton, did you change the cboot flags? Is there a non warranty voiding way to keep from losing everything when someone fucks up and hits space?

ExcessBLarg!
Sep 1, 2001

CaptainSarcastic posted:

Perhaps I have just had extremely good luck over the years, but I would find it difficult to think of a laptop that didn't work flawlessly under Linux.
Wireless has been an on and off again pain.

Graphics have been all over the map: Intel, despite long being opensource had some weird stuff in the i945 days, like having to patch the VESA BIOS to set native resolution. Nvidia is a choice between reverse-engineered drivers that support X.org extensions well but overheat and might not do 3D vs. the proprietary driver which doesn't support as many X extesnsions (e.g., xrandr) and had weird performance problems with Firefox whenever I used it. Oh, and the thing where the wrong Nvidia card would take five minutes to boot and beep a lot. I haven't used ATI in a long time, but when I did, the fglrx drivers were unstable as poo poo and it seems it took them a long time to figure that out (if they ever did).

Hotkeys, backlight adjustment, and touchpad might or might not work. ACPI S-states might fail, corrupt data, etc.

Perhaps things have been better in recent years. The last non-Chromebook laptop I purchased was a ThinkPad 410i in 2010.

SurgicalOntologist
Jun 17, 2004

keyvin posted:

For the people running Crouton, did you change the cboot flags? Is there a non warranty voiding way to keep from losing everything when someone fucks up and hits space?

Not sure, I haven't looked into it since I turned on developer mode. I don't do anything that isn't synced up somewhere else, whether through git/hg or Dropbox, and I save all the changes I make to in crouton as shell scripts/package lists/etc., so I'm not too concerned. Though I can see why this would be a dealbreaker for some people. I'd be interested to hear if there's a workaround.

A few times I've hit space by accident and it does give you a confirmation and a chance to back out.

Sauer
Sep 13, 2005

Socialize Everything!
The linux-chromebook modified kernel for Arch distros is pretty much a drop in replacement that fixes any issues on the Acer C720 and other Chromebooks. With it installed you don't need to do any of the parts in the Arch C720 wiki pages involving the Touchpad, Touchscreen, Suspend or Kernel parameters. Just remember to mask out the tmp directory ($ systemctl mask tmp.mount) if you compile the kernel on the Chromebook itself or you'll run out of RAM. Unmask it once the new kernel is installed.

Its also unnecessary to remove any screws from the C720 to use it with linux. After you enable developer mode in ChromeOS and reboot, you hit CTRL-L to load the SeaBios which will boot from a thumbdrive if it can or the hard drive. It does mean you'll need to hit CTRL-L anytime you reboot but you shouldn't have to do that much. This also prevents you from ever bricking the device.

I've been using my C720 with Arch and Openbox for months now. Its pretty good for coding and browsing and gets insane battery life. The screen is a bit crap but its a $200 dollar laptop, can't expect perfection.

Sauer fucked around with this message at 06:50 on Sep 12, 2014

CaptainSarcastic
Jul 6, 2013



ExcessBLarg! posted:

Wireless has been an on and off again pain.


Yeah, I should've made a more general statement about that - I've seen enough stuff about it on Linux forums that it should have occurred to me. When I was doing more installs I had access to a variety of wireless cards that I could swap in and out until I found one that worked, so was a little spoiled.

I really didn't start putting Linux on laptops until 2008-2009, and was working in a shop with lots of hardware I could change out as needed. Rather than troubleshooting too deep on any given distro, I would usually just throw distros at a machine until one stuck. Ubuntu, MEPIS, and PCLOS were the ones I used most, and generally one of those three would stick (with some degree of fiddling).

From 2011 or so (whenever the 12.2 release was) I have been installing pretty much nothing but OpenSUSE, as it has been just dandy on everything that I've thrown it at.

Hollow Talk
Feb 2, 2014

ExcessBLarg! posted:

Nvidia is a choice between reverse-engineered drivers that support X.org extensions well but overheat and might not do 3D vs. the proprietary driver which doesn't support as many X extesnsions (e.g., xrandr) and had weird performance problems with Firefox whenever I used it.

Just in case that makes any difference, Nvidia started shipping rudimentary XRandR support (up to 1.2, I think), which is good enough for screen setup etc., a while ago.

SYSV Fanfic
Sep 9, 2003

by Pragmatica

Sauer posted:

Its also unnecessary to remove any screws from the C720 to use it with linux. After you enable developer mode in ChromeOS and reboot, you hit CTRL-L to load the SeaBios which will boot from a thumbdrive if it can or the hard drive. It does mean you'll need to hit CTRL-L anytime you reboot but you shouldn't have to do that much. This also prevents you from ever bricking the device.

The issue isn't using it with Linux, the issue is accidentally taking it out of developer mode. Maybe they updated what happens when you hit space, but my brother accidentally did it. I had to re-install chromeOS on the SSD, then re-install Linux. It was after that I said screw it and opened it up so I could permanently change the boot behavior. Like I said in my post, you *can* leave chromeOS on it so you don't have to go through that. The downside is you lose a lot of space on a small SSD, and you have to alter the partition table in a precise way or chromeOS won't be able to boot anyways.

ExcessBLarg!
Sep 1, 2001

CaptainSarcastic posted:

I really didn't start putting Linux on laptops until 2008-2009, and was working in a shop with lots of hardware I could change out as needed.
That sounds about right. Linux on laptops has always been doable with hand-picked hardware, or getting a slightly older model where support has been pretty well worked out. But having a random laptop dumped on you and being asked "can you install Ubuntu on this and everything just works?" is a question that can't be answered without trying. And sometimes you don't have the chance to try and have to live with the results.

It's entirely possible that, after all this time, hardware has been sufficiently commoditized that most models really do just work out of the box. Although things like the T440 UEFI brick bug still give major pause--it's actually that exact problem that convinced me to investigate alternatives.

Anyways I freely admit that moving to Chrome-branded hardware is trading one set of frustrations for another. I still find it refreshing though.

Here's the thing: I wouldn't recommend that someone purchase a Chromebook or Chromebox unless they actually wanted to run Chrome OS on it. Sure, the Intel models can run regular Linux desktop distributions, and in the case of laptops, Chromebooks are decent hardware for the price. For small form-factor desktops I'd purchase an Intel NUC instead.

By running Chrome OS in developer mode and installing a chroot environment with crouton, you can do pretty much all desktop Linux activities in a reasonably convenient way. There are still frustrations though, perhaps the biggest once is the monthly Chrome OS force update which has a tendency to break developer mode behavior in subtle ways. So I still spend time futzing with stuff.

I guess what makes it worthwhile for myself is that Chrome OS, even in verified mode, handles 90% of my daily computing tasks out of the box. I do use dev mode shells and occasionally drop into an X session out of convenience, but it's only required for about 10% of what I do. Thus, it's incredibly convenient being able to grab random Chrome hardware, login and sync, and be off on my work. When my past Linux laptops died, I'd be unproductive for a day or more.

ExcessBLarg!
Sep 1, 2001

keyvin posted:

The issue isn't using it with Linux, the issue is accidentally taking it out of developer mode.
The last time I tried a full Ubuntu install I blew away all the partitions on the SSD. They're not required for legacy boot. After doing that, pressing spacebar required that I insert restore media since there no longer existed enough of the verifiable partitions for the device to restore verified mode without it. I'm fairly certain that after doing so (pressing spacebar, rebooting at the insert media screen) left Ubuntu intact.

The bigger problem is if you want to run Chrome OS in dev mode without accidentally blowing away the contents of the RW partition. I don't know, here's it's just not been a problem in practice as I reboot my Chromebook rarely. I do keep important/bulk data on an SD card (ext4 is natively supported, LUKS can be used with some effort). So worst case I have to rerun dev_install and crouton, but I don't lose anything critical.

SYSV Fanfic
Sep 9, 2003

by Pragmatica

ExcessBLarg! posted:

The last time I tried a full Ubuntu install I blew away all the partitions on the SSD. They're not required for legacy boot. After doing that, pressing spacebar required that I insert restore media since there no longer existed enough of the verifiable partitions for the device to restore verified mode without it. I'm fairly certain that after doing so (pressing spacebar, rebooting at the insert media screen) left Ubuntu intact.

The bigger problem is if you want to run Chrome OS in dev mode without accidentally blowing away the contents of the RW partition. I don't know, here's it's just not been a problem in practice as I reboot my Chromebook rarely. I do keep important/bulk data on an SD card (ext4 is natively supported, LUKS can be used with some effort). So worst case I have to rerun dev_install and crouton, but I don't lose anything critical.


You aren't "pretty" sure. I think you are drat sure :). There is no way you could forget having to re-install chromeOS.

After my brother hit space, that was it. It booted directly to the ChromeOS is missing or damaged screen with no way to re-enable developer mode w/o re-isntalling chromeOS.

I wonder if there are multiple firmware versions?

ExcessBLarg!
Sep 1, 2001
Yeah there's a crapload of firmware versions. A high level, new devices (Bay Trail?) are transitioning from Coreboot + U-Boot to Coreboot + Depthcharge. On a device-specific basis, part of the firmware is ready-only and can't be field upgraded. That might actually include all of the recovery process since it's needed to restore from bad flashes, I'm not sure.

I'm fuzzy on the exact behavior because I did restore Chrome OS after installing Ubuntu. I can't recall now if I did so only intentionally, or once accidentally too. You might be right.

Edit: And it was on a Chromebox. The C720 being one of the first Haswell device is almost certainly running an older firmware tree.

ExcessBLarg! fucked around with this message at 15:54 on Sep 12, 2014

SYSV Fanfic
Sep 9, 2003

by Pragmatica
Oh, if anyone does buy a c720, make sure to claim your goodies before wiping chromeOS. Mine came with 100gb of google drive for two years.

SurgicalOntologist
Jun 17, 2004

If it helps re:different firmware, the Chromebook on which I've occasionally hit space and been saved by a confirmation screen is a C7 (C700?) from a couple years ago.

JoeMB
Aug 13, 2011
I'm trying to install Arch Linux and I'm stuck on this command "gummiboot install" getting this error message "Failed to create EFI Boot variable entry: No space left on device". I did a bit of googling and that error seems to be related to nvram being full.
I did try deleting some unused entries using efibootmgr with the command
code:

efibootmgr -B -b 000[number]

The ones that are left:
code:

BootCurrent :0005
Timeout: 1 seconds
Boot0000* Corsair Slider 3.0 1.00
Boot0001* SATA2: Samsung SSD 840 PRO Seri
Boot0002
Boot0003
Boot0004* Built-in EFI Shell
Boot0005* UEFI: Corsair Slider 3.0 1.00
Boot0006
Boot0007
Boot0008

I'm trying to dual boot it with Windows 8 since there's still some games that aren't Linux compatible yet.

JoeMB fucked around with this message at 21:40 on Sep 12, 2014

evol262
Nov 30, 2010
#!/usr/bin/perl

JoeMB posted:

I'm trying to install Arch Linux and I'm stuck on this command "gummiboot install" getting this error message "Failed to create EFI Boot variable entry: No space left on device". I did a bit of googling and that error seems to be related to nvram being full.
I did try deleting some unused entries using efibootmgr with the command
code:
efibootmgr -B -b 000[number]
The ones that are left:
code:
BootCurrent :0005
Timeout: 1 seconds
Boot0000* Corsair Slider 3.0 1.00
Boot0001* SATA2: Samsung SSD 840 PRO Seri
Boot0002
Boot0003
Boot0004* Built-in EFI Shell
Boot0005* UEFI: Corsair Slider 3.0 1.00
Boot0006
Boot0007
Boot0008
I'm trying to dual boot it with Windows 8 since there's still some games that aren't Linux compatible yet.

Answer: stop using obscure bootloaders and use grub2

"No space left on device" is probably the EFI partition (FAT, probably the first partition on your device). But it could be you not mounting the efi firmware or some other thing. If the only place you can find people talking about it is the Arch forums, it's probably an unstable pile of crap that nobody should use.

SurgicalOntologist
Jun 17, 2004

What am I doing wrong? I'm trying to setup nginx to reverse proxy various apps running on various ports, for personal use only. I've got http basic auth over SSL setup, and various location blocks. Each one redirects properly, but then as soon as it tries to access some other resource it can't find it.

The first app I tried to configure was taskwarrior-web (did this one first because it should be relatively simple). It serves from host:5678/tasks and host:5678/projects. At first I wanted to put it at /task, then I realized it might be easier to put it at /tasks. So I also made a location block for /projects. So I could get to the barebones site but I was getting errors for its css, js, etc. My solution was to find where taskwarrior-web installed itself and symlimk everyting into /usr/share/nginx/html. It works!

On to the second app, RStudio server. It doesn't use a subdirectory for its main page so I used the rewrite directive to get rid of the /rstudio/ where I wanted to serve it from. The first thing the server does is redirect to host:port/auth_sign_in. So I made another location block. Then I had the same issue as before with the resources. I found where it keeps everything. But it has a ton of files, so before I started symlinking I figured there must be a better way, and I came here.

What am I doing wrong?

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Ah, that's annoying--the static assets and perhaps even links that the apps generate might be absolute instead of relative. I.e. they're tying to go to http://<your server>:<port>/foo instead of http://<your server>:<port>/application/foo. Looking at taskrabbit it looks like they have a bug on supporting something like that but it's still open. :/ https://github.com/theunraveler/taskwarrior-web/issues/56

SurgicalOntologist
Jun 17, 2004

So what you're saying is usually this sort of thing would be configured on the application rather than the server?

E: and there's nothing fundamentally incorrect about adding a nginx location block for every subdirectory and a symlink for every resource an app uses?

SurgicalOntologist fucked around with this message at 05:25 on Sep 13, 2014

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Yeah if it was a nice app it would let you tell it that you're putting it under a specific path and then generate URLs from there. What you're doing makes sense though, I think it's the only real workaround without changing the app code.

Ninja Rope
Oct 22, 2005

Wee.
If that application is the only thing on that vhost, you can just remap /(.*) to /application/\1.

telcoM
Mar 21, 2009
Fallen Rib

evol262 posted:


"No space left on device" is probably the EFI partition (FAT, probably the first partition on your device). But it could be you not mounting the efi firmware or some other thing. If the only place you can find people talking about it is the Arch forums, it's probably an unstable pile of crap that nobody should use.

EFI Boot Variables do not exist on the EFI partition: they are purely in NVRAM. Of course, the error message might be worded with less than 100.0% precision.

Also, the efibootmgr command does not display _all_ the EFI variables, just the boot-related ones. Look at /sys/firmware/efi/vars or /sys/firmware/efi/efivars to see the full list.
To see them, you may need to have kernel module(s) "efivars" and/or "efivarfs" loaded, and the efivarfs pseudo-filesystem mounted at /sys/firmware/efi/efivars.

If you see variables named like "dump-type0-*", you may have been using a kernel that has dumped its "dmesg" output to NVRAM at crash/sleep/shutdown. This was enabled by default when the CONFIG_EFI_VARS_PSTORE kernel feature was first introduced, until it turned out that some buggy EFI BIOSes react badly to NVRAM getting full.

(See kernel configuration options CONFIG_EFI_VARS_PSTORE and CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE. A nice feature in theory, but in practice the current state of the art of EFI firmware programming is such that you'd only want to activate it after careful consideration or when troubleshooting a specific problem that can't be caught otherwise.)

One way to (try to) delete EFI variables from the OS is:
code:
echo "name_of_variable_you_wish_to_delete" > /sys/firmware/efi/vars/del_var
If you can get to an EFI Shell at boot time, the "dmpstore -d name_of_variable" might also be used to delete extra variables.

Don't delete any variables whose purpose you don't recognize, unless you like finding potentially hardware-bricking firmware bugs.

hooah
Feb 6, 2006
WTF?
I have a machine that dual-boots Ubuntu and Windows 8.1. However, the Grub 2 menu had an old Windows 7 entry, probably off of my storage disk. I tried to delete it by reading this and this, but I somehow ended up doubling my menu entries, with the second copies starting after all the first copies (i.e. Entry1, Entry2, Entry3, Entry1A, Entry2A, Entry3A rather than Entry1, Entry1A, etc.). Here's what's in /etc/grub.d:
code:
00_header
05_debian_theme
10_linux
20_memtest86+
20_linux_xen
30_os-prober
30_uefi-firmware
40_custom~
README
40_custom
41_custom
The un-commented parts of my /etc/default/grub file:
code:
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
And my grub.cfg:
code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
else
  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=-1
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=10
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=10
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
	recordfail
	load_video
	gfxmode $linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd1,msdos5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	else
	  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	fi
	linux	/boot/vmlinuz-3.13.0-35-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro  quiet splash $vt_handoff
	initrd	/boot/initrd.img-3.13.0-35-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
	menuentry 'Ubuntu, with Linux 3.13.0-35-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-35-generic-advanced-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-35-generic ...'
		linux	/boot/vmlinuz-3.13.0-35-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-35-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-35-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-35-generic-recovery-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-35-generic ...'
		linux	/boot/vmlinuz-3.13.0-35-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro recovery nomodeset 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-35-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-32-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-32-generic-advanced-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-32-generic ...'
		linux	/boot/vmlinuz-3.13.0-32-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-32-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-32-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-32-generic-recovery-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-32-generic ...'
		linux	/boot/vmlinuz-3.13.0-32-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro recovery nomodeset 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-32-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-24-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-24-generic-advanced-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-24-generic ...'
		linux	/boot/vmlinuz-3.13.0-24-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-24-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-24-generic-recovery-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-24-generic ...'
		linux	/boot/vmlinuz-3.13.0-24-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro recovery nomodeset 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-24-generic
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
	insmod part_msdos
	insmod ext2
	set root='hd1,msdos5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	else
	  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	fi
	knetbsd	/boot/memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
	insmod part_msdos
	insmod ext2
	set root='hd1,msdos5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	else
	  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	fi
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-5A245A2B245A0A81' {
	insmod part_msdos
	insmod ntfs
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  5A245A2B245A0A81
	else
	  search --no-floppy --fs-uuid --set=root 5A245A2B245A0A81
	fi
	parttool ${root} hidden-
	chainloader +1
}
menuentry 'Windows 8 (loader) (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-chain-5E7A42997A426DB9' {
	insmod part_msdos
	insmod ntfs
	set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  5E7A42997A426DB9
	else
	  search --no-floppy --fs-uuid --set=root 5E7A42997A426DB9
	fi
	parttool ${root} hidden-
	drivemap -s (hd0) ${root}
	chainloader +1
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
else
  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=-1
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=10
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=10
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
	recordfail
	load_video
	gfxmode $linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd1,msdos5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	else
	  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	fi
	linux	/boot/vmlinuz-3.13.0-35-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro  quiet splash $vt_handoff
	initrd	/boot/initrd.img-3.13.0-35-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
	menuentry 'Ubuntu, with Linux 3.13.0-35-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-35-generic-advanced-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-35-generic ...'
		linux	/boot/vmlinuz-3.13.0-35-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-35-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-35-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-35-generic-recovery-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-35-generic ...'
		linux	/boot/vmlinuz-3.13.0-35-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro recovery nomodeset 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-35-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-32-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-32-generic-advanced-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-32-generic ...'
		linux	/boot/vmlinuz-3.13.0-32-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-32-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-32-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-32-generic-recovery-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-32-generic ...'
		linux	/boot/vmlinuz-3.13.0-32-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro recovery nomodeset 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-32-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-24-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-24-generic-advanced-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-24-generic ...'
		linux	/boot/vmlinuz-3.13.0-24-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-24-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-24-generic-recovery-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-24-generic ...'
		linux	/boot/vmlinuz-3.13.0-24-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro recovery nomodeset 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-24-generic
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
	insmod part_msdos
	insmod ext2
	set root='hd1,msdos5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	else
	  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	fi
	knetbsd	/boot/memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
	insmod part_msdos
	insmod ext2
	set root='hd1,msdos5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	else
	  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	fi
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 8 (loader) (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-chain-5E7A42997A426DB9' {
	insmod part_msdos
	insmod ntfs
	set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  5E7A42997A426DB9
	else
	  search --no-floppy --fs-uuid --set=root 5E7A42997A426DB9
	fi
	parttool ${root} hidden-
	drivemap -s (hd0) ${root}
	chainloader +1
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
Can anyone help me clean up this mess, please? Is there anything else I need to provide?

SurgicalOntologist
Jun 17, 2004

SurgicalOntologist posted:

What am I doing wrong? I'm trying to setup nginx to reverse proxy various apps running on various ports, for personal use only. I've got http basic auth over SSL setup, and various location blocks. Each one redirects properly, but then as soon as it tries to access some other resource it can't find it.

The first app I tried to configure was taskwarrior-web (did this one first because it should be relatively simple). It serves from host:5678/tasks and host:5678/projects. At first I wanted to put it at /task, then I realized it might be easier to put it at /tasks. So I also made a location block for /projects. So I could get to the barebones site but I was getting errors for its css, js, etc. My solution was to find where taskwarrior-web installed itself and symlimk everyting into /usr/share/nginx/html. It works!

On to the second app, RStudio server. It doesn't use a subdirectory for its main page so I used the rewrite directive to get rid of the /rstudio/ where I wanted to serve it from. The first thing the server does is redirect to host:port/auth_sign_in. So I made another location block. Then I had the same issue as before with the resources. I found where it keeps everything. But it has a ton of files, so before I started symlinking I figured there must be a better way, and I came here.

What am I doing wrong?

Does the try_files directive allow an opportunity to avoid this kind of symlinking? If so I can't quite figure it out.

telcoM
Mar 21, 2009
Fallen Rib

hooah posted:

Here's what's in /etc/grub.d:
code:
00_header
05_debian_theme
10_linux
20_memtest86+
20_linux_xen
30_os-prober
30_uefi-firmware
40_custom~
README
40_custom
41_custom
And my grub.cfg:
Can anyone help me clean up this mess, please? Is there anything else I need to provide?

Let's condense that grub.cfg a bit. It is produced mostly by the scripts in /etc/grub.d, and the parts produced by each script is marked with the ### BEGIN <scriptname> and ### END <scriptname>. In the beginning there is the "do not edit this file" comment block, created by the main grub-mkconfig.

(edit: some lines split with \ to minimize table breakage)
code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows \
  --class os $menuentry_id_option 'osprober-chain-5A245A2B245A0A81' {
	insmod part_msdos
	insmod ntfs
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 \
  --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  5A245A2B245A0A81
	else
	  search --no-floppy --fs-uuid --set=root 5A245A2B245A0A81
	fi
	parttool ${root} hidden-
	chainloader +1
}
menuentry 'Windows 8 (loader) (on /dev/sdb1)' --class windows \
  --class os $menuentry_id_option 'osprober-chain-5E7A42997A426DB9' {
	insmod part_msdos
	insmod ntfs
	set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 \
  --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  5E7A42997A426DB9
	else
	  search --no-floppy --fs-uuid --set=root 5E7A42997A426DB9
	fi
	parttool ${root} hidden-
	drivemap -s (hd0) ${root}
	chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

###### WTF begins here ######

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 8 (loader) (on /dev/sdb1)' --class windows \
  --class os $menuentry_id_option 'osprober-chain-5E7A42997A426DB9' {
	insmod part_msdos
	insmod ntfs
	set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 \
  --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  5E7A42997A426DB9
	else
	  search --no-floppy --fs-uuid --set=root 5E7A42997A426DB9
	fi
	parttool ${root} hidden-
	drivemap -s (hd0) ${root}
	chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
### END /etc/grub.d/41_custom ###

####### WTF ends here #######

### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
### END /etc/grub.d/41_custom ###
Looks like you still have a recognizable Windows 7 boot record in /dev/sda1, so the "30_os-prober" detects it and adds it to the menu.

The duplication of your boot menu is because you've apparently filled /etc/grub.d/40_custom with your complete grub.conf file, minus the Windows 7 boot entry.
It doesn't work that way unless you disable all the other scripts in /etc/grub.d... and if you do that, you'll have to do some manual work each time your Linux kernel package is updated, so don't do that.

First, fix the doubling by editing your /etc/grub.d/40_custom. It should contain a header like this:
code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
... and then either nothing or just the Windows 8 boot entry (see below).

Then to your ghost-of-Windows-7 issue:

The "safe" workaround would be to disable the os-prober (by adding GRUB_DISABLE_OS_PROBER=true" to /etc/default/grub, and then make sure the /etc/grub.d/40_custom contains only the Windows 8 boot entry and not the whole GRUB configuration.

The real fix would be to instead make /dev/sda1 (or whatever your ex-Windows7 disk now is) unrecognizable as a Windows 7 boot disk. At least on Debian, the os-prober is a collection of shell scripts, and the script responsible for detecting Windows 7 is /usr/lib/os-probes/mounted/20microsoft. Apparently it looks for the presence of /boot/bcd in the root of the Windows boot disk, so you'll just need to delete or rename that from your ex-Windows7 disk.
If you do this, be very careful not to damage your Windows 8 bootloader instead.

(It is a hidden directory, so you won't see it in Windows if your Folder Options are on default settings. Or just mount the filesystem on Linux and use your rootly might to remove the remains of the Windows 7 bootloader.)

After making the changes, run "sudo update-grub". It will run grub-mkconfig and place the new configuration file in the proper location.

telcoM fucked around with this message at 18:22 on Sep 13, 2014

telcoM
Mar 21, 2009
Fallen Rib

SurgicalOntologist posted:

What am I doing wrong? I'm trying to setup nginx to reverse proxy various apps running on various ports, for personal use only. I've got http basic auth over SSL setup, and various location blocks. Each one redirects properly, but then as soon as it tries to access some other resource it can't find it.

A basic reverse proxy only passes the queries to whatever application and answers back to the browser. It won't edit the content produced by the application in any way.

Any serious web application should have some way of configuring what kind of URLs it uses to point to itself, particularly the host part. You should adjust these settings to take your reverse proxy into account.

SurgicalOntologist posted:

The first app I tried to configure was taskwarrior-web (did this one first because it should be relatively simple). It serves from host:5678/tasks and host:5678/projects. At first I wanted to put it at /task, then I realized it might be easier to put it at /tasks. So I also made a location block for /projects. So I could get to the barebones site but I was getting errors for its css, js, etc. My solution was to find where taskwarrior-web installed itself and symlimk everyting into /usr/share/nginx/html. It works!

So... you're essentially reverse-proxying just the main HTML content and letting nginx provide all the resources of taskwarrior-web directly. Yeah, that can actually improve performance on static content over reverse-proxying the whole application, since a web server like nginx is supposed to be very, very good at serving static content. You'll just have to make sure you've caught *all* the non-static stuff with location blocks, or you might see... "unexpected behavior".

And if the application engine is vulnerable to some attack using a badly-formed URI, then this might actually give you some extra protection: if the attack URI does not match any of your application-specific Location blocks, it won't get passed to the application at all. Instead, nginx will just reply with a 404.

SurgicalOntologist posted:

On to the second app, RStudio server. It doesn't use a subdirectory for its main page so I used the rewrite directive to get rid of the /rstudio/ where I wanted to serve it from. The first thing the server does is redirect to host:port/auth_sign_in. So I made another location block. Then I had the same issue as before with the resources. I found where it keeps everything. But it has a ton of files, so before I started symlinking I figured there must be a better way, and I came here.

You might want to see if you can configure RStudio to use a specific host:port part (or even host:port/prefix) when generating URLs to point to itself. This is not the same thing as setting where RStudio actually listens for incoming connections!

Then have nginx reverse-proxy that to the actual RStudio port. That way you can manage overall access control with nginx, which is probably at least part of the reason why you're reverse-proxying in the first place.

These kind of configurations are sometimes needed when applications are integrated into a larger whole or served in a parallel fashion using a load balancer, so it would be semi-reasonable to expect any major Web applications to have the settings needed for that.

If this is the configuration for the kind of RStudio you're setting up:
http://rstudio.github.io/shiny-server/latest/#default-configuration
...then, changing the
code:
location / {
line to e.g.
code:
location /rstudio/ {
might allow you to present all the RStudio stuff at host:port/rstudio, which should make it easier to proxy/redirect with nginx.

SurgicalOntologist
Jun 17, 2004

That's really helpful, thanks. I think I'm starting to get a handle on this stuff.

As far as I can tell, RStudio Server doesn't have any options besides where it listens: https://support.rstudio.com/hc/en-us/articles/200552316-Configuring-the-Server

Unless I pay $10K for the pro version: https://s3.amazonaws.com/rstudio-server/rstudio-server-pro-0.98.501-admin-guide.pdf

What you linked is actually the config for Shiny Server, which is for deploying R applications--RStudio Server is a browser-based IDE (a really cool idea, wish I could run Sublime Text like that).

I managed to get it working with four location blocks. Unfortunately I can't disable its built-in authentication without the Pro version, so this whole thing was a bit pointless, after all typing <server>/rstudio/ is not really any more convenient than <server>:<port>, if easier to remember.

And actually, my intention all along has been to host it at <server>/rstudio/ as you suggest. But as far as I can tell this makes everything harder, not easier. I guess that wouldn't be the case if there was a prefix setting on the app side.

E: It's sort of strange though, as the docs suggest this:

code:
location /rstudio/ {
  rewrite ^/rstudio/(.*)$ /$1 break;
  proxy_pass http://localhost:8787;
  proxy_redirect http://localhost:8787/ $scheme://$host/rstudio/;
}
But I couldn't get it to work without also including
code:
location /auth-sign-in {
  rewrite		^/auth-sign-in	/rstudio/auth-sign-in;
}

location /auth-public-key {
  rewrite		^/auth-public-key	/rstudio/auth-public-key;
}

location /auth-do-sign-in {
  rewrite		^/auth-do-sign-in	/rstudio/auth-do-sign-in;
}
and I still get an issue where I have to re-retype the prefix as after logging in it redirects to <server> instead of <server>/rstudio.

Hmm, this suggests something about the headers. Guess I should play around some more.

SurgicalOntologist fucked around with this message at 20:50 on Sep 13, 2014

fuf
Sep 12, 2004

haha

evol262 posted:

You may want to read through this and try the suggestions.

This was ages ago but I forgot to say thanks for the help. I finally had a chance to read through that thread and try a few things and wifi seems more stable now. :)

hooah
Feb 6, 2006
WTF?

telcoM posted:

Lots of stuff

Thanks, I think that mostly helped sort it out. I was at least able to get rid of most of the duplicates. still have a second Windows 8 option. I got rid of the 41_custom script in /etc/grub.d. Here's what I have now:

/boot/grub.cfg:
code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 \
  --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
else
  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=-1
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=10
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=10
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os \
$menuentry_id_option 'gnulinux-simple-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
	recordfail
	load_video
	gfxmode $linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd1,msdos5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 \
           --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	else
	  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	fi
	linux	/boot/vmlinuz-3.13.0-35-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a ro  \
        quiet splash $vt_handoff
	initrd	/boot/initrd.img-3.13.0-35-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
	menuentry 'Ubuntu, with Linux 3.13.0-35-generic' --class ubuntu --class gnu-linux \
        --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-35-generic-advanced-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 \
                --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-35-generic ...'
		linux	/boot/vmlinuz-3.13.0-35-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a \
                ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-35-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-35-generic (recovery mode)' --class ubuntu \
        --class gnu-linux --class gnu --class os \
        $menuentry_id_option 'gnulinux-3.13.0-35-generic-recovery-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 \
                --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-35-generic ...'
		linux	/boot/vmlinuz-3.13.0-35-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a \
                ro recovery nomodeset 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-35-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-32-generic' --class ubuntu --class gnu-linux \
        --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-32-generic-advanced-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 \
                --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-32-generic ...'
		linux	/boot/vmlinuz-3.13.0-32-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a \
                ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-32-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-32-generic (recovery mode)' --class ubuntu \
        --class gnu-linux --class gnu --class os $menuentry_id_option \
        'gnulinux-3.13.0-32-generic-recovery-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 \
                --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-32-generic ...'
		linux	/boot/vmlinuz-3.13.0-32-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a \
                ro recovery nomodeset 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-32-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-24-generic' --class ubuntu --class gnu-linux \
        --class gnu --class os $menuentry_id_option \
        'gnulinux-3.13.0-24-generic-advanced-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 \
                --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-24-generic ...'
		linux	/boot/vmlinuz-3.13.0-24-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a \
                ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-24-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-24-generic (recovery mode)' --class ubuntu \
        --class gnu-linux --class gnu --class os $menuentry_id_option \
        'gnulinux-3.13.0-24-generic-recovery-f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a' {
		recordfail
		load_video
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 \
                --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		else
		  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
		fi
		echo	'Loading Linux 3.13.0-24-generic ...'
		linux	/boot/vmlinuz-3.13.0-24-generic root=UUID=f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a \
                ro recovery nomodeset 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.13.0-24-generic
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
	insmod part_msdos
	insmod ext2
	set root='hd1,msdos5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 \
        --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	else
	  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	fi
	knetbsd	/boot/memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
	insmod part_msdos
	insmod ext2
	set root='hd1,msdos5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 \
        --hint-baremetal=ahci1,msdos5  f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	else
	  search --no-floppy --fs-uuid --set=root f2a8aade-cb6d-4bf7-9b3b-defaa15bb55a
	fi
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 8 (loader) (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-chain-5E7A42997A426DB9' {
	insmod part_msdos
	insmod ntfs
	set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 \
        --hint-baremetal=ahci1,msdos1  5E7A42997A426DB9
	else
	  search --no-floppy --fs-uuid --set=root 5E7A42997A426DB9
	fi
	parttool ${root} hidden-
	drivemap -s (hd0) ${root}
	chainloader +1
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
#

### BEGIN /etc/grub.d/40_custom ###
menuentry 'Windows 8 (loader) (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-chain-5E7A42997A426DB9' {
	insmod part_msdos
	insmod ntfs
	set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 \
        --hint-baremetal=ahci1,msdos1  5E7A42997A426DB9
	else
	  search --no-floppy --fs-uuid --set=root 5E7A42997A426DB9
	fi
	parttool ${root} hidden-
	drivemap -s (hd0) ${root}
	chainloader +1
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/40_custom ###
### END /etc/grub.d/40_custom ###
And here's my 40_custom script:
code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
#

### BEGIN /etc/grub.d/40_custom ###
menuentry 'Windows 8 (loader) (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-chain-5E7A42997A426DB9' {
	insmod part_msdos
	insmod ntfs
	set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 \
        --hint-baremetal=ahci1,msdos1  5E7A42997A426DB9
	else
	  search --no-floppy --fs-uuid --set=root 5E7A42997A426DB9
	fi
	parttool ${root} hidden-
	drivemap -s (hd0) ${root}
	chainloader +1
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/40_custom ###
As an additional piece of information, when I rebooted after removing 41_custom, I got an error message saying something about my display not working, and I could try perhaps four options, including going to the terminal login. This happened for another two reboots. I did some exploring in those options, but nothing seemed to help. When I tried the terminal login, I just got a blinking underscore cursor. Same with trying the failsafe display mode (that might not be quite the right name). On the next reboot, however, everything worked fine.

hooah fucked around with this message at 20:24 on Sep 14, 2014

Polygynous
Dec 13, 2006
welp
You can remove the Windows 8 entry from 40_custom, it's still getting added automatically by 30_os-prober.

SYSV Fanfic
Sep 9, 2003

by Pragmatica
As mentioned, I have a chromebook. I also have a desktop that draws 70 watts at idle, compared to the chromebook's ~10-15. I would like to put some things (such as /var/spool/mail) on an nfs share so I can use the c720 more (with monitor/keyboard/mouse). I have a 3tb drive in an external enclosure. I have tried a raspi as a cheap way to get the external drive on the network. The raspi would frequently lock up under sustained reads and writes even when using a powered hub. Has anyone tried a beagle bone black for this? If the BBB isn't suited, are there any other suggestions?

evol262
Nov 30, 2010
#!/usr/bin/perl

keyvin posted:

As mentioned, I have a chromebook. I also have a desktop that draws 70 watts at idle, compared to the chromebook's ~10-15. I would like to put some things (such as /var/spool/mail) on an nfs share so I can use the c720 more (with monitor/keyboard/mouse). I have a 3tb drive in an external enclosure. I have tried a raspi as a cheap way to get the external drive on the network. The raspi would frequently lock up under sustained reads and writes even when using a powered hub. Has anyone tried a beagle bone black for this? If the BBB isn't suited, are there any other suggestions?

Anything is better than a pi. Cubie if you want native sata. Beagle if you want to do embedded programming or use BSD. Odroid if you just want fast and don't care about open or hackable

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Tried to do a dist upgrade from Xubuntu 12 to 14, now when it boots I get "The disk drive for /dev/mapper/cryptswap1 is not ready yet or not present. Continue to wait or Press S to skip mounting or M for manual recovery". Googling around I see some suggestions for things to try, but my system completely freezes up when this error appears, so I can't really try any of the fixes. What should I do?

Longinus00
Dec 29, 2005
Ur-Quan

fletcher posted:

Tried to do a dist upgrade from Xubuntu 12 to 14, now when it boots I get "The disk drive for /dev/mapper/cryptswap1 is not ready yet or not present. Continue to wait or Press S to skip mounting or M for manual recovery". Googling around I see some suggestions for things to try, but my system completely freezes up when this error appears, so I can't really try any of the fixes. What should I do?

Make a bootable linux usb and mount your mdcrypt volume manually so you can fix the issue.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Longinus00 posted:

Make a bootable linux usb and mount your mdcrypt volume manually so you can fix the issue.

Unfortunately the only external media I have available is a 512MB thumb drive, seems to limit my choice of live cd. I downloaded the Universal USB Installer from pendrivelinux.com and the Lucid Puppy iso. Tried to boot it and got "lupu_528.sfs not found" - but that file is on the thumb drive. Same error when trying to boot from "puppy pmedia=usbflash". Tried drat Small Linux and got a similar error.

fletcher fucked around with this message at 05:03 on Sep 15, 2014

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Alright I got a bigger thumb drive and successfully made my Ubuntu usb boot stick. I'm not really sure where to go from here though.

code:
ubuntu@ubuntu:/media/ubuntu/bd77d49a-87f1-4e65-93f9-708ffc5500bd$ more etc/crypttab
cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256
code:
ubuntu@ubuntu:/media/ubuntu/bd77d49a-87f1-4e65-93f9-708ffc5500bd$ more etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=bd77d49a-87f1-4e65-93f9-708ffc5500bd /               ext4    errors=remount-ro,noatime,discard 0       1
# swap was on /dev/sda5 during installation
#UUID=34a7acee-80d4-4fc0-a9b7-da3aa4411c21 none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0
# tmpfs
tmpfs   /tmp    tmpfs   defaults,noatime,mode=1777      0       0
code:
ubuntu@ubuntu:/media/ubuntu/bd77d49a-87f1-4e65-93f9-708ffc5500bd$ ls -la /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root  80 Sep 16 03:51 .
drwxr-xr-x 6 root root 120 Sep 16 03:51 ..
lrwxrwxrwx 1 root root  10 Sep 16 03:51 0000-0001 -> ../../sdb1
lrwxrwxrwx 1 root root  10 Sep 16 03:51 bd77d49a-87f1-4e65-93f9-708ffc5500bd -> ../../sda1
code:
ubuntu@ubuntu:/media/ubuntu/bd77d49a-87f1-4e65-93f9-708ffc5500bd$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0  59.6G  0 disk
--sda1   8:1    0    56G  0 part /media/ubuntu/bd77d49a-87f1-4e65-93f9-708ffc5500bd
--sda2   8:2    0     1K  0 part
--sda5   8:5    0   3.6G  0 part
sdb      8:16   1  29.9G  0 disk
--sdb1   8:17   1  29.9G  0 part /cdrom
loop0    7:0    0 938.7M  1 loop /rofs
I tried simply commenting out the cryptswap1 line from fstab to see if I could get it to boot but it still froze at the Xubuntu splash screen. So I changed "quiet splash" in the boot options to nomodeset and now I just get a black screen when booting.

edit: I noticed when I press the power button, the blank screen goes back to the console login prompt for a moment before shutting down. I tried resetting my xorg.conf but that didn't seem to help.

fletcher fucked around with this message at 09:51 on Sep 16, 2014

telcoM
Mar 21, 2009
Fallen Rib

fletcher posted:

I tried simply commenting out the cryptswap1 line from fstab to see if I could get it to boot but it still froze at the Xubuntu splash screen. So I changed "quiet splash" in the boot options to nomodeset and now I just get a black screen when booting.

edit: I noticed when I press the power button, the blank screen goes back to the console login prompt for a moment before shutting down. I tried resetting my xorg.conf but that didn't seem to help.

Sounds like "froze at the Xubuntu splash screen" is something like "the X server is not starting properly, leaving the boot splash on screen." In such a situation, removing the "quiet splash" boot options is a good thing: it should give you more information on the boot sequence.

However, depending on your display controller/GPU, adding "nomodeset" might be a bad thing: some newer GPUs can be used with a modesetting driver only. I think this includes (most?) Intel iGPUs.

According to your /etc/crypttab, your /dev/sda5 should contain a "disposable" encrypted swap area. Its encryption key is initialized from /dev/urandom, so anything in it is effectively lost as soon as the OS is shut down.
Because of this, your boot-up scripts should be running a "mkswap /dev/mapper/cryptswap1" sometime after the disk encryption is activated but before swap areas are activated (i.e. after "cryptdisks_start" or similar, but before "swapon").
If that does not happen, your previously-used swap area (when looked through a changed encryption key) does not look like a swap area, but like a partition of random noise.

Adbot
ADBOT LOVES YOU

hooah
Feb 6, 2006
WTF?

spoon0042 posted:

You can remove the Windows 8 entry from 40_custom, it's still getting added automatically by 30_os-prober.

That did it. Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply