# Ubuntu, White box after login



## dan101 (Feb 12, 2009)

After I log in to ubuntu, a white box appears at the top left of the screen. The white box is a terminal window which says "[email protected]:~$" How do I get onto my desktop, thanks I'm really new to this.


----------



## wmorri (May 29, 2008)

Hi,

Welcome to Linux. When you say get to your desktop are you saying that you don't have a desktop or can you close the terminal window?

Cheers!


----------



## dan101 (Feb 12, 2009)

Hi thanks for the reply,

After logging on, the screen background stays the same and a white box appears at the top left. I can type exit into the terminal which takes me back to the log in screen.


----------



## wmorri (May 29, 2008)

Hi,

I have never heard of this before. I will do a little searching and see what I come up with.

Cheers!


----------



## dan101 (Feb 12, 2009)

Ill take a photo of it when I get home.


----------



## dan101 (Feb 12, 2009)

Sorry I had to take them with my phone :S

I log on











Then this box appears










What do i do with this box, so I can go to the desktop? Thanks :wink:


----------



## wmorri (May 29, 2008)

Hi,

This is something that I have seen before, when you log in to a root terminal, but I don't know what you would be doing that. I would try typing this into terminal.

```
startx
or
sudo startx
```
See what that gets you. I am guessing that this is Ubuntu 10.04.

Cheers!


----------



## dan101 (Feb 12, 2009)

Didn't work, heres a photo below, its a bit hard to read but it is readable


----------



## wmorri (May 29, 2008)

Hi,

I have a feeling that ubuntu didn't install correctly on your computer. I would recommend that you try and install it agian. Use all of the same settings and see what the result it. When you choose what part of your hard drive to install it on choose to write over the existing linux partition.

If you have any question feel free to ask.

Cheers!


----------



## dan101 (Feb 12, 2009)

Its weird, it was working fine for two days then this happened, will try a new install now


----------



## dan101 (Feb 12, 2009)

I'm having trouble writing over the existing linux partition. Theres the option to install it along side my other OS and theres an option "advanced" something i forget but I choose that one and it ask what partition to install on, I click on the 24GB partition which is ubuntu but I won't let me go forward. I'm in a rush right now, ill explain more tomorrow.


----------



## dan101 (Feb 12, 2009)

So I specify partitions manually










Select my ubuntu partition 










But can't go forward.


----------



## wmorri (May 29, 2008)

Hi,

Thanks for the pictures. I would see what happens when you try and delete that partition. This will give you the space that you need. Not having a root partition might be the issue that you were having too.

Cheers!


----------



## dan101 (Feb 12, 2009)

So delete the partition and choose the install them side by side option? Thanks


----------



## wmorri (May 29, 2008)

Hi,

If you delete the partition the installer should see that you don't have a linux install. The install should then let you do a new install.


----------



## dan101 (Feb 12, 2009)

Thanks, Ill do that when I get home :wink:


----------



## dan101 (Feb 12, 2009)

I deleted all the partitions expect for the windows 7 and installed ubuntu again. But now at the boot screen there are now 2 ubtunu and 1 w7.


----------



## wmorri (May 29, 2008)

Hi,

Okay, well figure out which one is the real install of ubuntu and we can remove the other one from the boot list. It isn't that hard.

Cheers!


----------



## dan101 (Feb 12, 2009)

yep I know which one is the real one. How do I delete it?


----------



## wmorri (May 29, 2008)

Hi,

If you go to terminal and enter the following then post it in your next reply and I will help you remove the ubuntu that isn't working.


```
gedit /etc/default/grub
```
Cheers!


----------



## dan101 (Feb 12, 2009)

Nothing came up in that box 



edit - lol also if you look at that screenshot you can see that ive lost the bottom panel. How do I get it back?

Thanks, Dan


----------



## wmorri (May 29, 2008)

You mispelled default. Copy the code straight from the other post.


----------



## dan101 (Feb 12, 2009)

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

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=""

# 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=640x480

# 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"
```


----------



## wmorri (May 29, 2008)

Hi,

I would like you to run the following command to remove the entry that you don't want to show up in grub.


```
sudo chmod -x /etc/grub.d/[i]the entry that you want to remove[/i]
```
Cheers!


----------



## dan101 (Feb 12, 2009)

"the entry that you want to remove"

sorry but how do I do that?


----------



## wmorri (May 29, 2008)

Hi,

Change the entry that you want to remove to whichever ubuntu entry doesn't work.


----------



## dan101 (Feb 12, 2009)

but what do I add on the end of:

sudo chmod -x /etc/grub.d/

to specify the one which doesn't work?

If I put:

sudo chmod -x /etc/grub.d/

into the terminal by itself nothing happens

thanks


----------



## wmorri (May 29, 2008)

Hi,

What is the exact wording of the ubuntu option in GRUB 2 that doesn't work? Then I will write out the exact line for you.


----------



## dan101 (Feb 12, 2009)

```
Ububtu with linux 2.6.32-21-generic (on /dev/sda5)
```
And bellow it is this which I think belongs to it

```
Ububtu with linux 2.6.32-21-generic (recoverymode) (on /dev/sda5)
```
thanks


----------



## wmorri (May 29, 2008)

Hi,

I have been leading you astray I am sorry. Here is what you want to do:


# Too Many Kernels? Kernels removed via Synaptic or with "apt-get remove" will automatically update grub.cfg and no user action is required.

* In Synaptic, type the kernel number in the search window at the upper right (for example - 2.6.28-11).
* Find the "linux-image" and "linux-headers" files for the applicable kernel (example - linux-image-2.6.26-11 or "linux-image-2.6.26-11-generic).
* Right click and select "Mark for Complete Removal" and then press the Apply main menu button.
* The kernels will be removed from your system and from the Grub menu.
* If you are not sure of the kernel you are currently using, in a terminal type "uname -r".
* Many users keep one previous kernel on the machine which previously ran without problems.
Cheers!


----------



## dan101 (Feb 12, 2009)

Sorry I haven't posted earlier, my screen died so I had to get a new one. So what are kernels and what is synaptic? Sorry I'm all new to this.


----------



## wmorri (May 29, 2008)

Hi,

Glad to hear that you are still around. Don't worry about your screen dying that happens to everyone. I will break this down for you so that you can get this taken care of.

First off I will answer your questions. A Kernel, is the core code that the OS runs on, Linux, BSD, and Solaris are the three OS's that you will hear kernel thrown around a lot with but all OS's have a kernel. Windows has a kernel but it is deep in the OS and that isn't what this is about. In linux the most current stable Kernel is 2.6.33, so if you see when you do an update that it says it is installing a new kernel 2.6.33.something than that is what is it doing. 

Synaptic is a Package Manager. In other words it is a program that keeps track of all the programs and packages that are needed for a program to run. From that you can add/remove programs and packages. Now for the nitty-gritty. 

First I need you to look at GRUB. When it starts up before the countdown timer reaches 0 hit any key. From there you will want to look and see kernels you don't want and write them down.



> In Synaptic, type the kernel number in the search window at the upper right (for example - 2.6.28-11).


This first line tells you to open Synaptic. To do this you go to the System -> Preferences, and look for Synaptic Package Manger. Once you find it, and open it and do a search for the first kernel that you want to remove.



> Find the "linux-image" and "linux-headers" files for the applicable kernel (example - linux-image-2.6.26-11 or "linux-image-2.6.26-11-generic).
> 
> Right click and select "Mark for Complete Removal" and then press the Apply main menu button.


This is pretty self explanatory. You just look for the boxes that have the green or brown filed in box next to it right click on it and choose the option "Mark for Complete Removal", then choose Apply.



> If you are not sure of the kernel you are currently using, in a terminal type "uname -r".


If you aren't sure what kernel you have in terminal type uname -r and this will tell you. This way you won't go and delete the wrong one and that will delete a lot of data and we could have fun getting linux to boot. But don't worry too much.

So I will leave it there and let you give it a try. If you have any question or don't feel comfortable with a step please ask. As it is easier for me to explain it than it will be for you to fix the problem afterwords.

Cheers!


----------



## dan101 (Feb 12, 2009)

The entry I want to keep is this one

```
Ububtu with linux 2.6.32-21-generic
Ububtu with linux 2.6.32-21-generic (recoverymode)
```
And the entry I don't want to keep is this one.

```
Ububtu with linux 2.6.32-21-generic (on /dev/sda5)
Ububtu with linux 2.6.32-21-generic (recoverymode) (on /dev/sda5)
```
The problem is that the numbers are the same for both so how do I know which one I am removing?

Thanks


----------



## wmorri (May 29, 2008)

Hi,

I would look for 2.6.32-31-generic then and remove it. This should take care of both the normal boot and recoverymode.

Cheers!


----------



## dan101 (Feb 12, 2009)

I removed it from synaptic but It still shows on the boot screen. I went back and searched for "2.6.32-31" in the synaptic and it didn't find anything....I must be doing something wrong


----------



## wmorri (May 29, 2008)

Hi,

Try running this command in terminal and see if you are able to remove the entry.


```
sudo chmod -x /etc/grub.d/2.6.32-31-generic
```
This should remove the entry for you.

Cheers!


----------



## dan101 (Feb 12, 2009)

:4-dontkno


```
[email protected]:~$ sudo chmod -x /etc/grub.d/2.6.32-32-generic
[sudo] password for daniel: 
chmod: cannot access `/etc/grub.d/2.6.32-32-generic': No such file or directory
[email protected]:~$
```


----------



## wmorri (May 29, 2008)

Hi,

Can you go the the following folder and post the output for a file I think I have this thing figured out. I just didn't know how grub2 worked yet.


```
cd /boot/grub [color=blue]this changes the directory to /boot/grub[/color]
ls [color=blue]this command lists everything in the folder[/color]
gedit menu.lst [color=blue]this command opens the file menu.lst in gedit[/color]
```
Then we can work on removing a couple of things.

Cheers!


----------



## dan101 (Feb 12, 2009)

sorry where is "cd /boot/grub" I'm not too familiar with the file system.


----------



## wmorri (May 29, 2008)

Hi,

Well that was stupid of me I didn't tell you were to enter this information, sorry 'bout that. You will want to enter this information into terminal. to get to that in Ubuntu you go to Applications -> Accessories -> Terminal. Feel free to just copy the black text into terminal and you should be all set. Please ask any question that you have about this.

Cheers!


----------



## wmorri (May 29, 2008)

Hi,

Well that was stupid of me I didn't tell you were to enter this information, sorry 'bout that. You will want to enter this information into terminal. to get to that in Ubuntu you go to Applications -> Accessories -> Terminal. Feel free to just copy the black text into terminal and you should be all set. Please ask any question that you have about this.

Cheers!


----------



## dan101 (Feb 12, 2009)

Ok ive done what you told me, menu.lst came up but it was empty, heres whats in the terminal though.


```
[email protected]:~$ cd /boot/grub
[email protected]:/boot/grub$ ls
915resolution.mod            gcry_seed.mod       parttool.lst
acpi.mod                     gcry_serpent.mod    parttool.mod
affs.mod                     gcry_sha1.mod       password.mod
afs_be.mod                   gcry_sha256.mod     password_pbkdf2.mod
afs.mod                      gcry_sha512.mod     pbkdf2.mod
aout.mod                     gcry_tiger.mod      pci.mod
ata.mod                      gcry_twofish.mod    play.mod
ata_pthru.mod                gcry_whirlpool.mod  png.mod
at_keyboard.mod              gettext.mod         probe.mod
befs_be.mod                  gfxmenu.mod         pxeboot.img
befs.mod                     gfxterm.mod         pxecmd.mod
biosdisk.mod                 gptsync.mod         pxe.mod
bitmap.mod                   grldr.img           raid5rec.mod
bitmap_scale.mod             grub.cfg            raid6rec.mod
blocklist.mod                grubenv             raid.mod
boot.img                     gzio.mod            read.mod
boot.mod                     halt.mod            reboot.mod
bsd.mod                      handler.lst         reiserfs.mod
bufio.mod                    handler.mod         relocator.mod
cat.mod                      hashsum.mod         scsi.mod
cdboot.img                   hdparm.mod          search_fs_file.mod
chain.mod                    hello.mod           search_fs_uuid.mod
charset.mod                  help.mod            search_label.mod
cmp.mod                      hexdump.mod         search.mod
command.lst                  hfs.mod             serial.mod
configfile.mod               hfsplus.mod         setjmp.mod
core.img                     iso9660.mod         setpci.mod
cpio.mod                     jfs.mod             sfs.mod
cpuid.mod                    jpeg.mod            sh.mod
crc.mod                      kernel.img          sleep.mod
crypto.lst                   keystatus.mod       tar.mod
crypto.mod                   linux16.mod         terminal.lst
datehook.mod                 linux.mod           terminal.mod
date.mod                     lnxboot.img         terminfo.mod
datetime.mod                 loadenv.mod         test.mod
diskboot.img                 locale              tga.mod
dm_nv.mod                    loopback.mod        trig.mod
drivemap.mod                 lsmmap.mod          true.mod
echo.mod                     ls.mod              udf.mod
efiemu32.o                   lspci.mod           ufs1.mod
efiemu64.o                   lvm.mod             ufs2.mod
efiemu.mod                   mdraid.mod          uhci.mod
elf.mod                      memdisk.mod         usb_keyboard.mod
example_functional_test.mod  memrw.mod           usb.mod
ext2.mod                     minicmd.mod         usbms.mod
extcmd.mod                   minix.mod           usbtest.mod
fat.mod                      mmap.mod            vbeinfo.mod
font.mod                     moddep.lst          vbe.mod
fshelp.mod                   msdospart.mod       vbetest.mod
fs.lst                       multiboot2.mod      vga.mod
functional_test.mod          multiboot.mod       vga_text.mod
gcry_arcfour.mod             normal.mod          video_fb.mod
gcry_blowfish.mod            ntfscomp.mod        video.lst
gcry_camellia.mod            ntfs.mod            video.mod
gcry_cast5.mod               ohci.mod            videotest.mod
gcry_crc.mod                 part_acorn.mod      xfs.mod
gcry_des.mod                 part_amiga.mod      xnu.mod
gcry_md4.mod                 part_apple.mod      xnu_uuid.mod
gcry_md5.mod                 part_gpt.mod        zfsinfo.mod
gcry_rfc2268.mod             partmap.lst         zfs.mod
gcry_rijndael.mod            part_msdos.mod
gcry_rmd160.mod              part_sun.mod
[email protected]:/boot/grub$ gedit menu.lst
```


----------



## wmorri (May 29, 2008)

Hi,

It would appear that I am not as up to speed with the new GRUB2. There isn't a menu.lst as you have found the file that you need is grub.cfg.

Cheers!


----------



## dan101 (Feb 12, 2009)

Got it!


```
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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
  load_env
fi
set default="0"
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
}
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 5e8ab2e4-4425-416a-8b68-3785e22b5bb7
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 5e8ab2e4-4425-416a-8b68-3785e22b5bb7
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
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
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,7)'
	search --no-floppy --fs-uuid --set 5e8ab2e4-4425-416a-8b68-3785e22b5bb7
	linux	/boot/vmlinuz-2.6.32-21-generic root=UUID=5e8ab2e4-4425-416a-8b68-3785e22b5bb7 ro   quiet splash
	initrd	/boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,7)'
	search --no-floppy --fs-uuid --set 5e8ab2e4-4425-416a-8b68-3785e22b5bb7
	echo	'Loading Linux 2.6.32-21-generic ...'
	linux	/boot/vmlinuz-2.6.32-21-generic root=UUID=5e8ab2e4-4425-416a-8b68-3785e22b5bb7 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod ext2
	set root='(hd0,7)'
	search --no-floppy --fs-uuid --set 5e8ab2e4-4425-416a-8b68-3785e22b5bb7
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod ext2
	set root='(hd0,7)'
	search --no-floppy --fs-uuid --set 5e8ab2e4-4425-416a-8b68-3785e22b5bb7
	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)" {
	insmod ntfs
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 96322bec322bd053
	chainloader +1
}
menuentry "Ubuntu, with Linux 2.6.32-21-generic (on /dev/sda5)" {
	insmod ext2
	set root='(hd0,5)'
	search --no-floppy --fs-uuid --set 637c40d4-e3e7-4644-a7e4-09e0a49ddbf7
	linux /boot/vmlinuz-2.6.32-21-generic root=UUID=637c40d4-e3e7-4644-a7e4-09e0a49ddbf7 ro quiet splash
	initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry "Ubuntu, with Linux 2.6.32-21-generic (recovery mode) (on /dev/sda5)" {
	insmod ext2
	set root='(hd0,5)'
	search --no-floppy --fs-uuid --set 637c40d4-e3e7-4644-a7e4-09e0a49ddbf7
	linux /boot/vmlinuz-2.6.32-21-generic root=UUID=637c40d4-e3e7-4644-a7e4-09e0a49ddbf7 ro single
	initrd /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/30_os-prober ###

### 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 ###
```


----------



## dan101 (Feb 12, 2009)

^ You talking about the white box? Ive got that sorted now but I'm having trouble removing an entry off grub2


----------



## dan101 (Feb 12, 2009)

wmorri



dan101 said:


> Got it!
> 
> 
> ```
> ...


----------



## wmorri (May 29, 2008)

Hi,

Is there something special that I am looking for. I am sorry that I haven't been around to help you with this. If another user got it then great!

Cheers!


----------



## dan101 (Feb 12, 2009)

"Can you go the the following folder and post the output for a file I think I have this thing figured out. I just didn't know how grub2 worked yet."

You told me to post the outcome ^^


----------



## 29732 (Jul 7, 2010)

XD 
you are doing it all the hard way ^.^
if you are willing to reinstall ubuntu this is what you do
0.to start the process type in the terminal sudo fdisk -l
and then tell me what shows up


----------

