Wheezy lost password, other UbuntusI

More
02 Mar 2015 05:03 - 02 Mar 2015 05:04 #56384 by goslowjimbo
I installed Debian Wheezy (LinuxCNC) from a usb stick on my home computer. The computer is a Dell Optiplex 330. I have Windows7, Ubuntu 8 (LinuxCNC), and Ubuntu 12 (LinuxCNC) on this computer. The install seemed to go fine until I tried to reboot. The first thing I noticed is that the password for Wheezy either wasn't used in the install, or had been changed. The second thing I noticed is that everything on the 2nd drive (a 500GB drive) couldn't be found by the bootloader. The files for the 2 Ubuntus appear to still be there, but I can't boot to them.

I have tried a couple of solutions suggested on the internet for changing the password, to no avail. All of them have you change grub enough to boot to a non-graphic state, change the password with a passwd command, and then reboot.

The second drive had it's format changed to GPT. I have tried altering the boot to find what is wrong, but still no success. I am convinced the GPT formatting is part of the problem.

Any help is greatly appreciated.
Last edit: 02 Mar 2015 05:04 by goslowjimbo.

Please Log in or Create an account to join the conversation.

More
02 Mar 2015 06:55 #56388 by goslowjimbo
I forgot to state I have a boot-repair log at paste.ubuntu.com/10469073/

Please Log in or Create an account to join the conversation.

More
02 Mar 2015 07:15 #56389 by goslowjimbo
I forgot to state I have a boot-repair log at paste.ubuntu.com/10469073/

Please Log in or Create an account to join the conversation.

More
02 Mar 2015 15:38 #56395 by ArcEye
Hi,

Need to deal with the password first.

This post has instructions to boot into a root shell and change it.

www.linuxcnc.org/index.php/english/forum...rrect-password#52203

regards

Please Log in or Create an account to join the conversation.

More
02 Mar 2015 20:09 - 02 Mar 2015 21:14 #56402 by ArcEye
Regards EFI / GUID and GPT partitions and GRUB, it can cause problems

This gives a flavour
www.anchor.com.au/blog/2012/10/the-diffe...r-and-gpt-with-grub/

Quite honestly, a GPT partition should only be necessary for RAID. Who on earth would need a 2GB+ partition for a single OS install?

My current computer came with windoze 8, UEFI partitions and 'secure boot' enabled in BIOS.
Even disabling UEFI boot in BIOS did not solve the problem of the partitioning, which GRUB dealt with badly and I had to resort to a hand written grub.conf

After some bizarre problems booting into test kernels, that were not occuring on other machines, I wiped the whole drive, partitioned again and had
zero problems ever since.

GUID Partition Table detected.

Partition Start Sector End Sector # of Sectors System
/dev/sdb1 34 2,081 2,048 Logical Disk Manager (LDM) metadata partition (Windows)
/dev/sdb2 2,082 262,177 260,096 Microsoft Reserved Partition (Windows)
/dev/sdb3 262,178 976,961,396 976,699,219 Data partition (Windows/Linux)
/dev/sdb4 1,836,337,152 1,953,523,711 117,186,560 Data partition (Windows/Linux)
/dev/sdb5 976,961,536 976,963,583 2,048 Data partition (Windows/Linux)
/dev/sdb6 976,963,584 1,827,997,695 851,034,112 Data partition (Windows/Linux)
/dev/sdb7 1,827,997,696 1,836,337,151 8,339,456 Swap partition (Linux)


Your problem with /dev/sdb looks to be that it was partitioned by windows with a GUID partition table

The second thing I noticed is that everything on the 2nd drive (a 500GB drive) couldn't be found by the bootloader.


The bootloader has found your partitions on /dev/sdb ( or at least the 2 ubuntu ones, the first 2 are windows system partitions and not accessible)
menuentry "Ubuntu 8.04.2, kernel 2.6.24-16-rtai (on /dev/sdb3)" {
	set root=(hd1,gpt3)
	search --no-floppy --fs-uuid --set 34ca2e82-2909-4771-b51e-3025d8306333
	linux /boot/vmlinuz-2.6.24-16-rtai root=UUID=34ca2e82-2909-4771-b51e-3025d8306333 ro quiet splash 
	initrd /boot/initrd.img-2.6.24-16-rtai
}
.........................

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sdb4.
menuentry "Ubuntu, with Linux 3.13.0-45-generic (on /dev/sdb4)" {
	set root=(hd1,gpt4)
	search --no-floppy --fs-uuid --set e136f74c-dcef-4c9c-ad3b-025c26f93ce8
	linux /boot/vmlinuz-3.13.0-45-generic root=UUID=e136f74c-dcef-4c9c-ad3b-025c26f93ce8 ro quiet splash $vt_handoff 
	initrd /boot/initrd.img-3.13.0-45-generic

Once you get past the password, I would boot into sda5 (Wheezy) then save /boot/grub/grub.cfg as something else and edit it down to bare bones.

Then mount all the partitions in it and check the kernel numbers etc.
Then check the UUIDs of the drives against /dev/disk/by-uuid

Then try booting again. If you get problems, you can boot into the root shell again and put the saved grub.cfg back in place, or boot a live CD and do it from there.

If you get problems post your actual grub.cfg from sda5.

regards
Last edit: 02 Mar 2015 21:14 by ArcEye.

Please Log in or Create an account to join the conversation.

More
03 Mar 2015 09:49 #56418 by goslowjimbo
OK, found out how to change password, and it now works. Thanks for the info.

Played with the GPT partition issue, and found if I add a "insmod part_gpt" instruction to the grub file it boots the appropriate Ubuntu. How do I add this parmanently to the boot file?
Since the boot appears to be in hd1, msdos 5, and the Wheezy appears to be here also, I will try changing the grub file in Wheezy and see if it works.

Please Log in or Create an account to join the conversation.

More
03 Mar 2015 15:11 #56423 by ArcEye

Played with the GPT partition issue, and found if I add a "insmod part_gpt" instruction to the grub file it boots the appropriate Ubuntu. How do I add this parmanently to the boot file?


Yes it should be in grub.cfg, above the start of the section for each partition.

I'll look through my backups to see if I have an example

regards

Please Log in or Create an account to join the conversation.

More
03 Mar 2015 19:45 #56425 by ArcEye
I don't have the backups from before I wiped the GPT partitioning but this is the setup you should have for your discs

If it is
set root='(hdX,msdosX)

you need
insmod part_msdos
insmod ext2

to precede it

If set root='(hdX,gptX)

you need
insmod gpt
insmod ext2

to precede it

GRUB is pretty dumb and often gets it wrong.
For this reason I do not allow GRUB to be installed anywhere except to one maintainence partition and I upgate the grub.cfg by hand each new partition I commission.
May seem a bit extreme, but I have dozens of partitions and it has saved me from a lot of trouble.

regards
### BEGIN /etc/grub.d/30_os-prober ###

menuentry "sda2 3.2.0-4-rt-amd64" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos2)'
	search --no-floppy --fs-uuid --set=root 17cb90aa-4dfa-4b02-a60f-2aefc4c72a88
	linux /boot/vmlinuz-3.2.0-4-rt-amd64 root=/dev/sda2
	initrd /boot/initrd.img-3.2.0-4-rt-amd64
}

menuentry "sdb2 3.8-1-rtai-x86-amd64 " --class gnu-linux --class gnu --class os {
	insmod gpt
	insmod ext2
	set root='(hd1,gpt2)'
	search --no-floppy --fs-uuid --set=root 17cb90aa-4dfa-4b02-a60f-2aefc4c72a88
	linux /boot/vmlinuz-3.8-1-rtai.x86-amd64 root=/dev/sda2
	initrd /boot/initrd.img-3.8-1-rtai.x86-amd64
}
The following user(s) said Thank You: goslowjimbo

Please Log in or Create an account to join the conversation.

More
04 Mar 2015 05:13 #56443 by goslowjimbo
I'm alittle suprised I need to insert an ext module, but if it works, I'll do it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.165 seconds
Powered by Kunena Forum