Showing posts with label Tutorial. Show all posts
Showing posts with label Tutorial. Show all posts

Installing Windows 7 from a Pendrive (USB)

Objective: This tutorial will help you to make a bootable windows 7 pen drive.

Things needed: 
  • Windows 7 ISO image (Any version) + PowerISO software Installed. 
OR
  • Windows 7 DVD
  • A Pen drive preferably having space of 3GB.
Steps:
     1.  Install PowerISO and mount the windows 7 Image or if you have a windows 7 DVD insert it.
    
     2.  Plugin your pendrive.
    
     3.  Go to Control Panel\All Control Panel Items\Administrative Tools\Computer Managment\Storage you  can see your Disk layout. Check the Disk number for your pendrive.

Usually if you have one HD the the disk number is 1 else its 2.

    4.  Once you know your disk number open cmd prompt with Administrative privilage.

    5.  Execute the following steps one by one
  1. diskpart
  2. select disk 2
  3. clean
  4. create partition primary
  5. select partition 1
  6. active
  7. format fs=fat32
  8. assign
  9. exit
Once you are done copy the files from your virtual Windows 7 drive or Windows 7 DVD using the following command.
 xcopy d:\*.* /s/e/f e:\ where d is your windows 7 drive and e is your pen drive
Thats all. Now you can boot through your pen drive. If its not booting check your bios for option to boot from pen drive. Cheers!
Read More...

Navigating The File System And Simple Commands in Linux

NOTE: Only for the very fresh starters with Linux.
As we are doing the bare minimum these are the most often used commands:
cd = change directory
mkdir = make directory
rmdir = remove directory
rm = remove file
cp = copy
mv = move or rename
ls = lists directories and files
cat = show contents file

O.K. let's play:
Open an console on desktop 1, open the home directory by clicking on it on desktop 2 ( there you can see and verify the commands executed on desktop 1 )


CODE
$ mkdir One  ( without the $ ) ( makes a dir One in your home dir )
$ mkdir one  ( Linux is case sensitive so "One" and "one" are not the same ! )
$ cp tessst One  ( copies the file tessst, that we made in previous Tip, to dir One )
$ mv ssset one  ( moves the file ssset, that we made in previous Tip, to dir one )
$ mv one One   ( moves dir one in dir One )
$ cd One   ( see how the promt puts the current dir in in the prompt ) ( puts you in dir One )
$ ls  ( shows you what is inside One )
$ cat tessst  ( shows contents file tessst )
$ rm tessst  ( removes file tessst from One dir )
$ cd ..  ( puts you back in your home dir )
$ rm tessst  ( removes tessst from home dir )
$ rm -rf One  ( now all files and directories we played with are removed )

We have a look in the filesystem:

CODE
$ cd  /
$ ls
This shows you the directories in “/“ (root filesystem): /boot, /etc, /initrd, /lost+found, /opt, /root, /tmp, /var, /bin, /dev, /home, /lib, /mnt, /proc, /sbin, /usr.

CODE
$ cd /mnt
$ ls
This shows you the mounted devices, cdrom, cdrom2, floppy, (win_c)

CODE 
$ cd  ( Brings you back to your /home )
$ ls  ( What is in your home )
$ ls -a  ( What really is in home !!  The argument “-a” shows the hidden files. Hidden files start with “.” )
$ touch .tessst  ( Makes an empty hidden file called .tessst in /home )
$ ls  ( You don't see .tessst )
$ ls -a  ( You do see .tessst )
$ rm .tessst  ( Removes the hidden file .tessst )
$ ls -al  ( Shows you all the files in /home with their “permissions” more about that later. )

To know more about these commands and the arguments you can give them, see: "man cd" "man cp" "man mv" etc. etc.
Read More...

Linux Tips - Lost User Password

Now, just imagine, you have a sudden strike of growing old, and, you forgot your user password. I know it´s hard to figure, but weirder things happen !

The solution however is simple:
CODE
$ su
< root-password >
# passwd pkb
( if that is your username, don´t use mine )

Type in a new password ( you will likely get an error message, ignore it )
Type in the same password again !

Log out as root and log in as user with your new password !
( I said is was easy ! )

Next time we will attack the forgotten ROOT password ! A bit more complicated but it sure can be done.
Read More...

Linux Tips - Lost ROOT Password

Yesterday we had forgotten our user password and disaster strikes again today we forgot the root password.

Note: First, disconnect your PC from the net, pull the cable out !

Step 1: For Redhat and Mandrake:

Then boot from your first install CD and as the very first screen comes up hit F2 and type:

rescue ( For RedHat "linux rescue" )

and the computer will boot in rescue mode.

It will show a few alternatives, select : ¨mount the existing partitions¨ and go to the shell/console prompt.

( Booting Mandrake in "failsafe" from the Lilo menu does the same )

Step 1: For SUSE:
Boot from your first install CD and press F1 at the first screen, then choose "Rescue System" from the menu and at the prompt type "root" ( you do not need a password )

Step 1: For other distro's

Boot from the first install CD ( or any Live CD like Knoppix ) and at the bootprompt type:

CODE
linux single
( For Knoppix: knoppix single )
And it will boot in "single user mode" and you will get an odd looking prompt like “sh-2.05b#

Alternative for step 1
Sure with most Live and Rescue CDs you can also just boot in the live version, mount the partition and, as root, make changes to the files indicated below:

Step 2

CODE
# cd /etc
( if you boot from knoppix first cd to the partition your lost-password-distro is on )

We need to change two files; ¨passwd¨ and ¨shadow¨:

CODE
# vi passwd

( opens the file )
< i > ( puts vi in insertmode )

This is the first line:

root:x:0:0:root:/root:/bin/bash

Make it:

root::0:0:root:/root:/bin/bash

So just get writ of the ¨x¨ do not touch the ¨:¨ ( colons )

Save the file:
Esc
ZZ

Second file to be changed:

CODE
# vi shadow
( open the file )
< i > ( insert mode )

The first line is a long scrambled line of characters, just make it:

root:::: ( four colons ! )

Save the file
Esc
ZZ

Now you can reboot your computer. Log in as normal user, open a console and type:

CODE
$ su
# passwd

And set the new root password !

Log out as root:
Ctrl+d

And the job is done !!

WARNING: Only after setting your new root password it is safe to connect your computer to the internet or local network again !!
Read More...