Showing posts with label Boot. Show all posts
Showing posts with label Boot. Show all posts

Friday, December 19, 2008

Recover Lost Windows Login Password With Live Cd's

So you have a Windows PC and you forgot the login password.
What do you do? How do you retrieve or reset it?
There are several solutions including making your own bootable Cd's with the needed tools but I'm going to focus on 2 solutions that only require downloading and burning to a Cd.

Those being PCLoginNow and Trinity Rescue Kit.

I find it quite humorous how Microsoft has made claims that their newest OS is so secure. There are no more backdoor Admin logins and the implementation of SYSKEY which is
an optional feature added in Windows NT 4.0 SP3.
It was meant to protect against offline password cracking attacks so that the SAM database would still be secure.

Unfortunately, Microsoft underestimated the power of Linux.
Both of the following software are based on Linux and can achieve the same results. That is getting your password back or reseting it to a new one.

PCLoginNow is a small (55 Meg) ISO file that you download and then burn to a Cd. Based on Linux it is very easy to use and works on 2000, 2003, 2008, XP and Vista. It also has good driver support for most IDE and Sata drivers so you have the best chance of getting access to your hard drive.

And it can access both the Admin and User passwords.
You can also change or lock accounts, change policies or totally remove them.
The best part of all this is that this software is free.
You can read more about it and download it from their website.
PCLoginNow Website


The other software is the Trinity Rescue Kit.
A 130 meg ISO image that you burn to a Cd, this software is more then a password reset software although that is just one of it's many tools.
Again, this is a Linux based Live Cd with a twist.
It uses command line entries similar to the old Dos command days.
This is due in part to a bootable Dos utility disk he had once built.
It also keeps the size of the Cd down to a minimum by not having an integrated desktop manager like Gnome or KDE.

This software reads like a who's who of software and utilities.
It can rescue and repair a crashed PC. Both Windows and Linux.
It can clone a system across a network and more.
Be sure to read the documentation before you use it or even print it out although the newest version of TRK has the documentation built in.

You can read about and get TRK from their website;
Trinity Rescue Kit Website


As I said earlier, there are several other password reset/recovery tools available but the above 2 are easily available and bootable without requiring the user to create their own bootable Cd.

Enjoy!

TaZMAn



Friday, November 28, 2008

My Ubuntu File System Became Corrupted

The other day I was doing a few things on my Ubuntu system and decided to do a reboot.
On restart my system would hang on boot up.
So I rebooted and hit the ESC key to get access to the grub menu. I figured I'd try to try the recovery mode.

Well it wouldn't boot and reported a file system error. I told it to fix it. It tried but came back with a corrupt file system error.
OH SHEETZ!!
Remebering back to my Windows days this can be a 2 day job until I get all the updates and software installed.
Fortunately, this isn't the case with Linux.

I was running Gutsy and had planned to upgrade to Ibex as I have been reading and receiving positive reports about it.
But I wasn't really ready to do it yet. I hadn't set up a seperate Home partiton when I installed Gutsy so my first task was to retrieve and back that folder up.

I grabbed my trusty Knoppix DVD and booted it up to a Live session.
I like Knoppix because it is easy to change Read/Write permissions on a hard drive or partition and provides you with a ton of applications should you need them.

Once I was up and running in Knoppix I began the task of moving about 40 gigs of data from my Home folder to a different partition on my hard drive.
The whole process took about 2 hours. Not really that long and it may have been less as I didn't time it but I do know it was not more then 2 hours.

Now that my data was safe I grabbed my Cd of Ibex which I had burned a few weeks ago in anticipation of upgrading.
The new partitioner is nicer looking and provides more info and options about the hard drives and partitions.
It was set to Automatic and wanted to resize the original partiton that contained Gutsy. Since that file system was corrupt and I didn't want Gutsy I clicked on the Manual Partitioning setting.

I told the partitioner not to touch my other hard drive or partitions.
Then I set up a partition for Home, Root and Swap.
Got through the rest of the screens and clicked Install.

The Cd spun up and it was about 15 minutes later I get a message that the install is finished!
I pop out the Cd and reboot. It boots back up and I'm looking at the new desktop.

First things first. I go and grab the updates. All 170 megs of them. Also grab the Nvidia restricted driver.
Then I install Thunderbird and configure it. I move my email inbox and addy book from my backed up Thunderbird.
Kill my network connection and open Thunderbird to make sure everything is there. It is!
So I reconnect my network and get my email.

Next I install a few Firefox addons and import my passwords and bookmarks.
Then I install Flash and a few other plugins.
Go to Medibuntu and add in their repository to my list.
Now I open Synaptic and procede to grab all the software and goodies I usually use.
Finally I move my Nautilus scripts from the backed up folder to the new script folder.

Total time for install of Ubuntu until I finished moving the scripts was 2 1/2 hours!!
A whole lot better the the day or two I would have spent restoring a Windows machine.
There are several reasons as to why it takes much less time with Linux.
2 of the major reasons are as follows;

1) When you download and install the updates you only have to reboot once after they are all installed. This is due to the kernel update and the installation of the Nvidia driver.

2) All the software I needed was available from a single source list. I didn't need to look all over the internet for the software packages. Also, I didn't need to reboot after every software install.

There are a few things I have previously done that helped my restore my system.
One is that I use the Password Import/Export addon for Firefox and export my password file everytime I acquire a new password.
Secondly is that I export my bookmarks on a regular basis although this is not really needed as Firefox regularly backs up your bookmarks to a sub-folder within the Firefox folder.

And as to the $1,000,000 question as to what caused my file system to become corrupt?
I searched the log files I had from the Gutsy system.
I'm using a Desktop system but my cpu is a mobile processor.
I had been playing with the hibernate and suspend features.

According to the log files, hibernate had failed 2 times in the past few times I had used it.
When hibernate is implemented, all the open data is stored to Ram.
Because hibernate failed to properly implement, I believe the data in the Ram became corrupted and was written back to the hard drive in it's corrupted form.
This caused damage to the file system which recovery could not repair.

So now I am up to date with Ibex. Have everything back up to where I previously had been and didn't loose one bit of my personal data.
And it was all finished within 1/2 a day!
And now that I have my Home on a seperate partition, I won't have to worry about crashes like this one again.

The key is not to panic and have a clear cut plan of action as to backing up your data and reinstall procedures.

Good to be back!

TaZMAn

Friday, November 7, 2008

Multiboot Linux Cd And Automake Script Download

I have been asked numerous times about providing download links to some of my multiboot disks I have made. Unfortunately, they are all over 4 gigs as they contain 8 or more distros on them and my upload speeds make that type of upload almost impossible.

So I put together a small multiboot Cd that will provide you with Damn Small Linux, Puppy Linux and Memtest.
The total size is 136 megs and is split into 2 rar files (Using the script in my previous post) and is available via the 2 Rapidshare links.

MultiCd Part 1 75 Megs
http://rapidshare.com/files/161640669/multicd.iso-Split_RAR-75Megabyte_s_.part1.rar

MultiCd Part 2 61 Megs
http://rapidshare.com/files/161640671/multicd.iso-Split_RAR-75Megabyte_s_.part2.rar

Not only do you have a small Iso file but it contains 2 fully functional Linux systems and a utility to test your Ram! Also, both are very small and fast and will work on older, slower systems with minimal Ram and hardware.

It will also help you to see how a multiboot Cd is made although I have a confession to make.
Every other multiboot disk I have ever made was created by me from scratch. I did all the tedious editting and creating both the loader and menu.

But then I found a forum post that has a script to make multiboot disks.
It supports many distros and even a WinPE compilation.
There is a slight bug however that doesn't seem to affect the final Iso.
It has to do with the genisoimage version 1.1.6
I get an error that it expected a certain value but gets a different value.
No matter. I leave it run and it usually finishes with a working Iso.

But I have had the occasional tests where the script failed after getting that error.
It is a known bug when dealing with genisoimage version 1.1.6
If you use an older version you have no problems.
I must express the fact that the genisoimage bug is not due to itself but rather the way scripts are trying to use genisoimage.

Another con of this script is that it allows a limited choice of Linux distros.
The creator of the script has done a remarkable job of adding many distros but there are some good ones missing.
Also, because many distros use the same kernel you have to be careful of which versions you add into your compilation.

Examples would be Damn Small Linux and Knoppix. They both use the Knoppix kernel. Because the kernel of each Distro needs to be in the root path of the Cd and they are named the same you can't use both on a Cd unless you do custom editting of the files needed to boot up a renamed kernel.

But other then that it does a good job of creating multiboot Iso's.

The forum post can be found here;
http://ubuntuforums.org/showthread.php?t=718016

And the script file can be found on this page;
http://multicd.tuxfamily.org/

I strongly suggest you read all the pages in the forum post and the page at tuxfamily to understand how this script is used.

Enjoy!!

TaZMAn

P.S. I hope a few thank you's are in order.

Wednesday, October 1, 2008

Linux Multi-Boot Disks

Update!
Check my November 7th post for a script to auto-make your own multi-boot disk and links to a small Cd iso image I made using this script.

There seems to be more info and instructions on how to make a multi-boot Windows
based disk then there is for Linux distros.
This is probably due to how different Linux distros boot up.
Some use vmlinuz and syslinux while others use casper to boot up the kernel.

This presents a problem especially when you have several distros that use the same kernel. Examples would be Knoppix, and Damn Small Linux. They both use the Knoppix kernel.

So how do you get around this problem when making a multi-boot Linux disk?
Well there are several options. You can change one of the kernel names then use a hex editor to make the name change in vmlinuz to point it to the proper renamed kernel.

You could also use a Grub Loader menu program to load the proper kernel.
And there is a program available for Windows called Easy Boot that supposedly allows you to add Linux distros to a multi-boot disk.
I have used the first 2 methods for my projects.

Yes, I have made a total of 3 multi-boot Linux disks.
I got interested when I saw a multi-disk in a Linux magazine. Didn't buy the magazine because it was too expensive. So I looked around the internet for info on how to make one.
Info was sparse or even cryptic in nature. But I pieced together the info and designed my first disk using the method of hex editting the vmlinuz files.
That first disk, a DVD, had 7 distros on it.

Not satisfied with it, I started a 2nd project.
That disk used the grub boot menu and had 8 distros on it.

My 3rd disk is more of an updated disk then a fully made from scratch disk.
I happened to find a release from several years ago by someone who also was interested in making a multi-boot Linux disk.
The distros were very old so I redid it with newer releases. This was the easiest of the 3 to make.
LOL!

I am planning one more disk. That will be a Windows-Linux multi-boot.
Will use something like UBCD and either Slax, Gentoo or maybe Knoppix.
That way I will have a ultimate repair disk that I can use to fix both Windows and Linux systems.

Making these disks was a very good challenge and provided me the ability to try out different linux versions. And I did pick out a bunch of non run of the mill versions.
And it has paid off. I have found numerous software that works better for my needs.
Sticking with one or two distros keeps you too confined. Exploring various versions exposes you to the best of the best.

I also learned that all the distros on any of the 3 disks I made do not work on all computers.
It's strange but I guess it all depends on what the version supports.
Some distros hated my newer computer while others wouldn't even boot on my older computer.
That is something I'd like to fix but it would require the adding of drivers to each distro and recompiling each kernel. More work then it's worth because I have the ability to use one of the other distros on the disk.

All three of these disks were run as Live distros. I wouldn't attempt to use them to install that particular version seeing how some of the components were removed during the construction of these disks.

Will I make any more after the Windows/Linux disk?
Doubtful. It was a challenge to myself and I doubt anyone else would be interested in these disks.
I proved to myself that it can be done without cheating like they did with that computer magazine disk.

Cheating!???
What do you mean they cheated?

Well I found out a few weeks later that the magazine used a dual layer DVD and had Ubuntu as their base system. You booted the disk and it started up Ubuntu. Then from Ubuntu you selected that other distros that were installed in vmware.
So they didn't create a 'real' multi-boot disk like I did.
And by running vmware from within Ubuntu while in a 'Live' environment, they require the user to have a fairly powerful computer with plenty of Ram.

My method only uses the needed resources for the single distro running at that time.
That makes it older computer friendly.

So go to Google, look up the info and make your own multi-boot disk.
It's not only fun, it gives you a good feeling after you finish it.

Enjoy!

TaZMAn



Sunday, July 6, 2008

Editing the Grub Loader Menu

You have your computer set up as a dual boot system and the list of menu items keep growing every time there's a kernel update.

You know that annoying look. That screen shows your Microsoft OS, Memtest and several kernel entries along with their recovery mode images.

Here's how to pare down that list.

WARNING!
Not properly following the directions below may cause your system to not boot.
Proceed at your own risk. I will not be responsible for any damages incurred by your inability to follow directions.

We first need to open up the menu list for emitting. To do that open up a terminal window and type in the following;

sudo gedit /boot/grub/menu.lst

Type in your pasword when prompted.

Now your menu list will open with the permissions needed to edit it.

Look for entries in your menu list that look similar to this;

## ## End Default Options ##

title Ubuntu 7.10, kernel 2.6.22-15-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-15-generic root=UUID=15024b26-e9da-497b-8744-ccfd6170eb84 ro quiet splash
initrd /boot/initrd.img-2.6.22-15-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-15-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-15-generic root=UUID=15024b26-e9da-497b-8744-ccfd6170eb84 ro single
initrd /boot/initrd.img-2.6.22-15-generic

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=15024b26-e9da-497b-8744-ccfd6170eb84 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=15024b26-e9da-497b-8744-ccfd6170eb84 ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 7.10, kernel 2.6.22-13-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-13-generic root=UUID=15024b26-e9da-497b-8744-ccfd6170eb84 ro quiet splash
initrd /boot/initrd.img-2.6.22-13-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-13-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-13-generic root=UUID=15024b26-e9da-497b-8744-ccfd6170eb84 ro single
initrd /boot/initrd.img-2.6.22-13-generic

title Ubuntu 7.10, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

What we need to do is comment out all the older kernels and their recovery mode entries.
I strongly suggest that you keep the 2 newest entries and their recovery mode entries.
Here's how;

In the above example we can see there are 3 kernel entries.
The newest being 2.6.22-15-generic and the oldest being 2.6.22-13-generic
We want to get rid of the 2.6.22-13-generic and the 2.6.22-13-generic (recovery mode) entries from the boot menu.

So we will comment those entries out. To do that we will use the ## characters to do the commenting.

When it's done it should look like this;


## ## End Default Options ##

title Ubuntu 7.10, kernel 2.6.22-15-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-15-generic root=UUID=15024b26-e9da-497b-8744-ccfd6170eb84 ro quiet splash
initrd /boot/initrd.img-2.6.22-15-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-15-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-15-generic root=UUID=15024b26-e9da-497b-8744-ccfd6170eb84 ro single
initrd /boot/initrd.img-2.6.22-15-generic

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=15024b26-e9da-497b-8744-ccfd6170eb84 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=15024b26-e9da-497b-8744-ccfd6170eb84 ro single
initrd /boot/initrd.img-2.6.22-14-generic

##title Ubuntu 7.10, kernel 2.6.22-13-generic
##root (hd0,0)
##kernel /boot/vmlinuz-2.6.22-13-generic ##root=UUID=15024b26-e9da-497b-8744-ccfd6170eb84 ro quiet splash
##initrd /boot/initrd.img-2.6.22-13-generic
##quiet

##title Ubuntu 7.10, kernel 2.6.22-13-generic (recovery mode)
##root (hd0,0)
##kernel /boot/vmlinuz-2.6.22-13-generic ##root=UUID=15024b26-e9da-497b-8744-ccfd6170eb84 ro single
##initrd /boot/initrd.img-2.6.22-13-generic

title Ubuntu 7.10, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST


As you can see, we put a ## in front of all the entries for the 2.6.22-13-generic kernel.
You need to do this to all the kernel entries older then the newest 2.
That way, should you have a problem with the newest kernel, you can boot into the next oldest one and fix the problem.

Now that we have that cleaned up, let's set the menu so that it doesn't keep adding new kernels to the list that we just cleaned up.

Here's what you need to do.
Look for an entry similar to this in the menu list;

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

We need to edit the last entry that says # howmany=all
Change the =all to =2

It should look something like this;

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=2


Now your list should never display more then 2 kernel versions along with the recovery mode links.

Close the menu list and select the option to save the changes.

Now for the moment of truth.
Reboot your computer.
If you did everything properly you should only see the 2 newest kernels listed in the grub menu and it will boot up properly when you select the kernel to boot to.

Good luck and enjoy!!!

TaZMAn