2

I've been dual booting Win7 and Ubuntu for about 4 months and I got on it today to change the default boot on grub, because my girlfriend kept getting locked out when it reboots and, by default, goes to the Ubuntu partition.

I tried using the command promt. I used the command found here which was sudo gedit /etc/default/grub

That didn't appear to do anything so I changed the grub using the file manager and changed "Default grub=4" which, is the boot I was supposed to use...

This led to my Windows 7 partition dissapearing from the boot list, somehow, although all files are still showing up on the OS (checked through Ubuntu) and System Recovery shows my latest restore, attempted to restore and said it should be working..

So I'm assuming its hidden in some way?

I'm using BT5R3.

/etc/default/grub:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=4
#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="text splash vga=791"
GRUB_CMDLINE_LINUX=""

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1024x768

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

Shell history:

1  exit
    2  startx
    3  apt-get software center
    4  apt-get software-center
    5  sudo apt-get software-center
    6  install software-center
    7  mkdir /opt/java
    8  mv -f jre1.70_05/ /opt/java
    9  tar xzvf jre-7u45-linux-i586.tar.gz.
   10  tar: tar xzvf jre-7u45-linux-i586.tar.gz
   11  tar xzvf jre-7u45-linux-i586.tar.gz
   12  apt-get install synaptic
   13  help
   14  install synaptic
   15  apt-get synaptic
   16  apt-get install synaptic
   17  lspci -v
   18  help]
   19  help
   20  help mapfile
   21  help
   22  info strict refs
   23  startx
   24  edit grub
   25  search grub
   26  apt-get install sphinxsearch
   27  search grub
   28  edit grub boot
   29  find grub
   30  startx
   31  startsx
   32  startx
   33  -terminal
   34  terminal
   35  apt-get install rsplib-tools
   36  --fix-missing
   37  apt-get update
   38  terminal
   39  apt-get install rsplib-tools
   40  terminal
   41  update grub
   42  update-grub
   43  open partition manager
   44  open
   45  help
   46  search partition manager
   47  help
   48  find partition manager
   49  find partitionmanager
   50  startx
   51  find gparted
   52  get gparted
   53  get Gparted
   54  get-apt Gparted
   55  X-AppInstall-Package=gparted
   56  help
   57  startx
   58  run history
   59  history

 

$ sudo grub-mkconfig > /dev/null
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.6
Found initrd image: /boot/initrd.img-3.2.6
Found memtest86+ image: /boot/memtest86+.bin
done

$ sudo fdisk -l  
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb3b6d9a6


 Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              13       83647   671785946    7  HPFS/NTFS
/dev/sda3           83647      119927   291422209    5  Extended
/dev/sda4          119927      121577    13249536    7  HPFS/NTFS
/dev/sda5           83647      118706   281610240   83  Linux
/dev/sda6          118706      119927     9810944   82  Linux swap / Solaris
terdon
  • 234,489
  • 66
  • 447
  • 667
Kramer42
  • 21
  • 3
  • Um... okay, grub – Kramer42 Jan 30 '14 at 06:27
  • Thanks. And the commands you ran? Also post the output of `sudo grub-mkconfig > /dev/null` – terdon Jan 30 '14 at 06:33
  • Okay, so type that into the comand prompt and paste what it responds? – Kramer42 Jan 30 '14 at 06:35
  • OK, nothing you did on the terminal could have affected your grub setup. You didn't run any commands with `sudo` (as the administrator) so you wouldn't have been able to change any system files. And yes, just type `sudo grub-mkconfig > /dev/null` hit enter and add the output to your question. – terdon Jan 30 '14 at 06:36
  • 1
    Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.2.6 Found initrd image: /boot/initrd.img-3.2.6 Found memtest86+ image: /boot/memtest86+.bin done – Kramer42 Jan 30 '14 at 06:42
  • Please provide output of `sudo fdisk -l`. His grub config. file probably just lost the stanza for the windows partition. This sometimes happens when a update is done on the system. – slm Jan 30 '14 at 06:44
  • 2
    That's a lowercase L (l), not a one (1). It's a `-l` as in list. – slm Jan 30 '14 at 06:46
  • By the way, you can paste text into a terminal by selecting it (the text) and then middle clicking o the terminal. Selecting is like Ctrl+C ad middle clicking like Ctrl+V – terdon Jan 30 '14 at 06:52
  • FYI you only need to change `GRUB_HIDDEN_TIMEOUT_QUIET=true` to `false` run `sudo update-grub`. Is weird that Windows disappeared tho. – Braiam Jan 30 '14 at 06:55
  • Okay.. lemme try that and reboot it (srry, for delay was taking my gfs friend home) also, Idk what you mean about the L/1 thing... – Kramer42 Jan 30 '14 at 07:13
  • You used `fdisk -1` (dash + one) instead of `fdisk -l` (dash + lowercase L) so the information you pasted is not useful. – Braiam Jan 30 '14 at 07:16
  • OOH... okay, also, Win7 still isn't on there.. I'll redo the Fdisk and put it up. – Kramer42 Jan 30 '14 at 07:18
  • okay, so changing Grub timeout to false did nothing, and the fdisk-l (L) is on the thing now. :| – Kramer42 Jan 30 '14 at 07:23
  • What is the output of `sudo os-prober`? – Braiam Jan 30 '14 at 14:58
  • You might want to consider trying grub-customizer. It's a gui app that does most of this for you. grub2 is a bit harder to hand edit than grub was. It constructs a bunch of entries on the fly when you configure it. https://launchpad.net/~danielrichter2007/+archive/grub-customizer – Joe Feb 03 '14 at 05:37

0 Answers0