Question: I'm sort of new to all this, and am not quite sure what I did. I somehow managed to delete the boot menu from my computer, so when it starts it automatically goes into Ubuntu. I got the boot menu back using boot-repair, but now Windows 7 isn't showing up as an option in the menu. Can anyone explain how to fix this and make it an option again? 

UPDATE: I've been trying to figure out what I did wrong, and based on other things I read it looks like there's supposed to be a second boot partition for windows and that is what I accidentally deleted somehow. So now grub does not recognize that windows is there. How do I fix that? 

<http://paste.ubuntu.com/12073785/>

<http://paste.ubuntu.com/12073797/>

Answer: 
That's extremely easy if you use the following set-up:

1. Use your existing bootable USB stick to install Ubuntu on an [SLC USB stick](https://en.wikipedia.org/wiki/Single-level_cell#Single-level_cell) (USB 3.0 preferred if your hardware supports it) Just a normal install, *treating the USB stick as an SSD.*

**Why?** The SLCs are twice as expensive as the [MLCs](https://en.wikipedia.org/wiki/Multi-level_cell) but they are 4 times faster and last 8\* longer! *So they really are small SSDs on a stick!*
2. Reboot from the USB and optimize the system and treat the USB stick as a small SSD, so:

In your `/etc/sysctl.conf` add:

```
# Fabby: change the "swappiness" to 10 to prevent swapping as much as possible
# to not wear out the USB stick as the Ubuntu default is optimized for a server.
# 10 to balance with vfs_cache_pressure
vm.swappiness = 10

# Fabby: Lower vfs_cache_pressure to 75% 
# (once cached, probably not immediately needed any more)
#
# This percentage value controls the tendency of the kernel to reclaim
# the memory which is used for caching of directory and inode objects.
#
# At the default value of vfs_cache_pressure=100 the kernel will attempt to
# reclaim dentries and inodes at a "fair" rate with respect to pagecache and
# swapcache reclaim.  Decreasing vfs_cache_pressure causes the kernel to prefer
# to retain dentry and inode caches.
vm.vfs_cache_pressure = 75

# Fabby: Good to improve sequential reads (stop stuttering in movie play)
# Can also be implemented per disk using udev rules
vm.max-readahead=2048
vm.min-readahead=1024

```

In your `/etc/fstab` add the **bold paramaters** to your boot USB line. (It'll probably be `sdc` or `sdd`. The below is an example, use UID if possible) 

`/dev/sdc / ext4 defaults,**noatime,discard**,errors=remount-ro 0 1`

Done! :-)
=========

For the record: I have a 16GB USB 2.0 SLC stick just like this (more then enough for my use-case and not too expensive and it's about 5 years old now and still running!)
If you burn a live Linux image to the USB drive, it will be booted read-only and therefore changes will only be stored in RAM. If you're not prepared to give up hard drive space to Ubuntu, you can burn the ISO to a second flash drive (even 2 GB is enough), boot it and install it to the 32 GB drive. I did that when 14.10 was in Alpha, and while it did suffer some performance issues, it was usable.