Jump to content


Tips for Linux Explorers


  • This topic is locked This topic is locked
375 replies to this topic

#101 OFFLINE   mrselfdestruct

mrselfdestruct

    New Kid

  • Members
  • Pip
  • 5 posts

Posted 14 May 2003 - 12:09 AM

Hi Everyone,(If you want to read my tip skip the first paragraph)Bruno, I really appreciate the information you have posted! Linux and I have an off and on again relationship but with people like you helping out I hope to build a lasting and working knowledge of Linux. A friend recommended Scot's newsletter and it has been a vast resource of knowledge of Windows and now Linux too. Thanx Scot!Here is my tip:If you have ever wondered about the status of your network connection ie. if Full-Duplex is in effect. I ran across a simple program that shows you statistics about your interface.If you go to Linux Ethercard Status, Diagnostic and Setup Utilities website, you can download the mii-diag.c source code. Once you download the source, go to the directory that you downloaded it to and type <gcc mii-diag>, assuming that you have gcc installed. If not, the Mandrake Control Center --> Software Management --> Search for gcc will install it. Assuming again, that you have a rpm source setup correctly. Once you compile the source code, a binary will be created. When you run the program with <./mii-diag> you will get the promised statistics. Note: There are compile switches that can change the way mii-daig works. More information can be found in the documentation on the website or in the source code itself.Have Fun!

#102 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 14 May 2003 - 05:54 AM

Welcome to the forum mrselfdestruct and thank you for those kind words. The fact that you, next to these praises are including a tip in your very first post is a very good start ! I really hope we can restore your "off and on" relationship with Linux. Looking forwards to your admissions. If at any time you think we're overlooking one of your posts ( weird things do happen sometimes ) feel free to send us a PM.:P Bruno

#103 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 14 May 2003 - 05:37 PM

MD5SUM of an ALREADY BURNED CD
( Also see: Check CD Script )

A few posts back I told you to do the md5sum on the ISO files themselves, just because that is far off the easy way ! ;)
However CD's can be checked too, it only takes a little more.
First check if you have "isoinfo" installed on your Linux box.
Type in a console:
$ whereis isoinfo

If it's not installed, look for it on your install-CD's !

Here is how it is done ( my example here is a Slackware 9.0 CD )
Put the CD in your CD-rom player, and type in a console:
$ isoinfo -d -i /dev/cdrom

This will give you something like this:

Quote

CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: Slack9d1
Volume set id:
Publisher id: Slackware Linux, Inc. <info@slackware.com>
Data preparer id: Slackware Linux, Inc. <info@slackware.com>
Application id: Slackware Linux 9.0 disc 1
Copyright File id:
Abstract File id:
Bibliographic File id:
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 339344
Joliet with UCS level 3 found
Rock Ridge signatures version 1 found

The only important info of this output are these two lines:
Logical block size is: 2048
Volume size is: 339344

Now, leave the CD in the player and type:
$ dd if=/dev/cdrom bs=2048 count=339344 conv=notrunc,noerror | md5sum

BEWARE: change the numbers with the ones you found in the previous output !!

This will produce a new output ( takes several minutes ! )

Quote

339344+0 records in
339344+0 records out
563c1bfff307a16d45f5da04011f07b6 <===( This is the checksum number ! )

Now go to the mirror you have downloaded your ISO from ( or any other mirror ) and pick up the text-file md5sum. This textfile contains the original number:

Quote

563c1bfff307a16d45f5da04011f07b6 slackware-9.0-install.iso

If this number matches the number you found in the output above, you can be sure your CD is integer !

In this case it was, but then I always check the numbers before burning my CD, 'cause that's so much easier and does not turn any blank CD's into coasters !  :D :D

UPDATE: Recently added to the tips: Check CD Script

B) Bruno

#104 OFFLINE   Borst

Borst

    Message Adept

  • Members
  • PipPipPip
  • 35 posts

Posted 15 May 2003 - 01:29 PM

WOW!  This is quite a book of knowledge Bruno. B)   Although I have only breifly read this post, I have already learned much.  I had several Linux questions but I see several are answer.  Keep up the good work!Borst

#105 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 15 May 2003 - 01:35 PM

Thank you Borst, and welcome to the forum.Hope you will find a "home" here !B) Bruno

#106 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 15 May 2003 - 03:22 PM

CONFIG COMMANDS in REDHAT ( and FEDORA )


If you want to shutdown the services via the console (xterm) or terminal, then login as root....Type in 'ntsysv' You will then get a list of the services. Press F1 for more info. To disable use the space-bar. And finally OK. Reboot and note the changes.....

Via GUI, RedHat has a tool too; ''redhat-config-services"

Btw, the other system-admin tools for RedHat are:
redhat-config-date   
redhat-config-httpd   
redhat-config-keyboard
redhat-config-kickstart   
redhat-config-language   
redhat-config-mouse   
redhat-config-network
redhat-config-network-cmd   
redhat-config-network-druid  
redhat-config-network-gui   
redhat-config-network-tui
redhat-config-nfs   
redhat-config-packages
redhat-config-printer  
redhat-config-rootpassword
redhat-config-samba
redhat-config-securitylevel
redhat-config-services
redhat-config-soundcard
redhat-config-services
redhat-config-timeredhat-config-users
redhat-config-xfree86
redhat-control-network
redhat-install-packages
redhat-logviewer
redhat-update-gnome-font-install
redhat-update-gnome-font-install2

Many thanks to our special agent !

B) Bruno

PS: Fedora has most of that commands too . . but they start with "system-config-", here they are:
system-config-date
system-config-display
system-config-keyboard
system-config-language
system-config-lvm
system-config-network
system-config-network-cmd
system-config-printer
system-config-rootpassword
system-config-samba
system-config-securitylevel
system-config-services
system-config-soundcard
system-config-time
system-config-users
system-control-network
system-install-packages
**** need to give name of package to install

#107 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 15 May 2003 - 03:37 PM

EXTRA MOUSE BUTTONS

A lot of you people have a mouse with all those fancy extra buttons: three, four or even seven buttons are common place these days. Makes me wonder where we will end up . . maybe some day the keyboard will be integrated in your mouse!

Anyway, let's get those buttons work for us:

First you need to set up your mouse in XFree86 (When using Xorg the file is /etc/X11/xorg.conf )
$ cat /etc/X11/XF86Config-4

( to check if the file is in the right place, if so: )
$ su
< password >
# vi /etc/X11/XF86Config-4
(open the file in vi )
< i > ( put vi in insert mode )
look for the "input device"  mouse section and adapt it to look like: ( line 3, 5 and 6 !! )

Quote

Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/psaux"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7"

Save and close vi:
Esc
ZZ

After that you need to give the command:
# xmodmap -e "pointer =1236745"

Then make a script in .kde/Autostart:
$ vi /home/bruno/.kde/Autostart/mouse
(makes the file "mouse" )
< i > ( put vi in insert mode )

and put the following lines in there:

Quote

#!/bin/shxmodmap -e "pointer = 1 2 3 6 7 4 5"
Save and close vi
Esc
ZZ

Once your wheel works you can test to see the extra buttons with < xev > (place mouse in the square and click the buttons and see what happens).

Then you need to download the program "imwheel" (1.0.0pre1) you can find it Here and install it.  

It is a .tar.gz file ( tarball ) see for instructions page 3 of the Tips for Starter!

And make a file .imwheelrc in your /home directory:
$ vi /home/bruno/.imwheelrc

(creates the file )
< i > (puts vi in insert mode )

and add the lines:

Quote

".*"None, Up, Alt_L|LeftNone, Down, Alt_L|Right

Save and close vi
Esc
ZZ

And make a script to start the imwheel program:
$ vi /home/bruno/.kde/Autostart/imwheel
( makes the file in Autostart )

< i >
( puts vi in insert mode )

With the following lines:

Quote

#!/bin/shimwheel -k -b "67"

Save and close vi
Esc
ZZ

And that is all my friends, now you can simply restart KDE ( or give the command: imwheel -k -b "67" ) and have fun!

B) Bruno

PS: Thanks to Ryan for testing and providing the link!

NOTE: PCLos 9.2 seems to need special treatment, you can read about the solution here: http://forums.scotsn...h...st&p=181607

#108 ONLINE   LilBambi

LilBambi

    Australisches Googler

  • Forum Admins
  • 21,190 posts

Posted 15 May 2003 - 05:27 PM

Hey, Bruno! Wonderful! More great tips all the time!  B)
Bambi
AKA Fran

Posted Image
My Public Key for Email :: BambisMusings Blog :: Fran's Computer Services Blog :: MyPassionIsBooks Blog :: 5BuckReview :: CNIRadio
"The Net interprets censorship as damage and routes around it." ~John Gilmore (Time Magazine, Dec 6, 1993)

#109 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 16 May 2003 - 05:13 AM

Thanks Fran !There is more coming ! B)B) Bruno

#110 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 16 May 2003 - 06:46 PM

CRON-JOBS and the CRON DAEMON

Cron-jobs are maintenance jobs performed automaticly on your system every night, once a week or a month. Jobs like "logrotate" ( refreshing log files and zipping up old ones ) updatebd ( updating your "locate-search" database ) and a lot of other databases like the rpm database. Cron comes from the Greek word chronos ( Time )

The program that takes care of this is the Cron-daemon. At a pre-selected time it starts doing the jobs that are to be done. Mostly between 3 and 5 at night because then it does not interrupt the users working hours. (if your computer is off at those times you'll have to install "anacron" that picks up forgotten jobs the next time the computer boots ).

There are cron-jobs system wide, general rules that you should not be messing with. But you can add a series of user specific rules.

The schedule for cron is written in the /etc/crontab file.
Lets have a look at the system corntab:
$ cat /etc/crontab

Will show:

Quote

# run-parts
01 * * * * root nice -n 19 run-parts /etc/cron.hourly
02 4 * * * root nice -n 19 run-parts /etc/cron.daily
22 4 * * 0 root nice -n 19 run-parts /etc/cron.weekly
42 4 1 * * root nice -n 19 run-parts /etc/cron.monthly

The order of codes here is:  minute, hour, day-of-month, month, day-of-week, user and command. The * means any value will do. So the first line tells it every ) 01 minutes, of 1 hour, of every day, of every week and every month "run-parts /etc/cron/hourly" The second line tells it to do the daily jobs at 4.02 hrs. The third line to do on day 0 the weekly job at 4.22. The last line to do every 1st of the month the monthly job at 4.42!
If those times are very inconvenient you could change them to your preferences.

O.K so what is in  /etc/cron.daily  ?
$ cd /etc/cron.daily
$ ls

This will show you this:
0anacron - logrotate - makewhatis.cron - msec - rpm -  tmpwatch

Those are all little scripts for the tasks to be done.
Just add your script ( backup ? ) and it will run with the other daily tasks. Shell or bash script it does not really matter.

Example: Have a look at the rpm script now that we are in the right directory:
$ cat rpm
will show you:
#!/bin/sh
rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 | sort > /var/log/rpmpkgs

See ? . . . . . .  #!/bin/sh on the 1st line and a "simple" command on the 2nd line!

Do explore a little and see what all the hourly to monthly tasks are about.

I only did explain all this to you so you would better understand how things are done by the software you are running !

B) Bruno

#111 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 17 May 2003 - 04:58 PM

UPDATING your URPMI-SOURCES

A few pages ago ( page2 ) I told you about adding your urpmi-sources.
From time to time you have to update your urpmi-sources because packages on those mirrors will change and you will no longer be able to use this clever install utility.

Updating is as easy as 1 2 3 :As root in a console ( while you're on line ) :
# urpmi.update -a

That's all !

But then, it's Saturday night, so I would want to put your head through too much stress !

B) Bruno

#112 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 17 May 2003 - 07:21 PM

COMMANDLINE MP3 PLAYER

Sunday is a day to chill-out and listen to a sheer endless stream of music.
Here is a neat little trick for you commandline-lovers that really pays off!
To play ALL mp3's on your computer in random order:
$ mpg123 -Z --list <(locate "*.mp3")
Note: the special characters: -- < " * .  " they all have to be there !
To stop playing: Ctrl+c ( 2x )

Sure you can play just one song too:
$ mpg123 /home/bruno/music/dylan/To_Ramona.mp3

For more options see "man mpg"

So now you can listen to some music while tweaking your computer ! :D
Have a nice sunday !

B) Bruno

PS: A commandline mp3 player uses no GUI thus is extremely easy on systemresources !

#113 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 18 May 2003 - 09:02 AM

BASIC RULES FOR INSTALL

I know it's a bit late to come with basic install tips, but it looks like a good thing to give a few guidelines:

If you want to check first if your hardware is supported try a Live CD

1) Don't forget to do a good backup of important data on your computer even if it is on a partition that won't be effected by the install !

2) Make a plan in advance on how you want your partitions done ( see Here ) and what filesystem you want to use ( Ext3, ReiserFS  etc. See Here and Here )

3) Do not uses all your free space of the windows partition, you might want to leave some working-space there for adding new programs or temp files ( CD burning programs need at least 700 MB temp ) we don't want to cripple your windows OS. :)

4) BIOS: Put the entry: PnP aware OS on NO ! ( See Here )

5) BIOS: First boot device: CD-ROM, second Floppy, third IDE-0

6) Connect all printers, scanners, card readers etc. and make sure they are turned on

7)  Check out the README and INSTALL text files on your CD

8) Note down the root-password you make during install. ( once you have used it a couple of times you can burn the evidence :lol: )

9) Install the bootloader Lilo or Grub in the MBR ( it will include your windows options automatically ).

Pin this on the wall, and read it again every time you make a new install !

B) Bruno

#114 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 19 May 2003 - 03:52 PM

BASIC MACHINE INFORMATION

There are a few commands you can use to get the kernel version , machine number and a couple of other basic info of your computer:
$ cat /proc/version
  
Will give you a full string of information.

$ uname -m
Will give you the machine number ( like i686 )

$ uname -r
Will show the kernel version

$ uname -n
The localdomain name

$ uname -s
The system name

$ uname -p
The processor

$ uname -a
All info above in one + date and time

B) Bruno

#115 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 19 May 2003 - 04:29 PM

WHAT IS IN THAT PACKAGE ?

Here is a short one:
We can see what is in a package ( rpm or tar.gz or tgz ) , with the following command:
$ less /home/bruno/downloads/package.rpm
( replace "package.rpm" with the name of the file )

We will do more tricks with the command "less" another time !

B) Bruno

#116 OFFLINE   charlie

charlie

    Message Mogul

  • Members
  • PipPipPipPipPip
  • 428 posts

Posted 19 May 2003 - 05:36 PM

Bruno's tips....a little feed back.  The HD partitioning ... both my desk top and laptop have a modifed , size wise of the 10 Gb drive , updated and it is  working great.  last week a Linux friend and I installed Mandrake 9.1 using the 15 Gb +  configeration , but as there was no "+" and the /backup was left out.  The install picked up both printers, an Epson and a Brothers and the high speed cable connection.  One thing the /backup brought forth was the question , where is the Mozilla files (Mail) The mail files and the Mozilla dir are in a hidden file ./Mozilla/.../.../  which can be viewed by making them visiable in the file manager,  copy to a safe place on another Hd and restore after installation. The PLF , urmpi information, required a little more thought.  My PPPoe needs to be active to make these commands work so I just downloaded a large file to make sure I was connected   all three operations worked fine , the plf.asc , urpmi update and urmpi update page  Now to arrange all the information in a binder so I can find it .... and last but not least get Xine to work reading DVD's   Been a long haul with this program .  still not able to run DVD'scharlie from down east Canada ;)

#117 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 19 May 2003 - 05:48 PM

Thanks for your feedback Charlie ! And the additional information.Always good to hear that people have good use with the Tips, and there is more of them comming up.So get yourself a large binder !  ;) :) Bruno

#118 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 20 May 2003 - 04:12 PM

GETTING IN TEXT MODE and SHUTTING DOWN X

There was a question in a thread about installing Nvidia drivers about how do I leave X and get the computer in text mode.

There are 2 ways to do that:

EITHER:
Ctrl+Alt+F1 (or F2 to F6 ) Will get you out of X
Alt+F7 will get you back in X

OR:
$ root
< password >
# init 3 ( will get you in runlevel 3 )
# init 5 ( will get you back in runlevel 5 )

Alt+F7 will get you back in X

Read also the Tip about "Runlevels"

B) Bruno

#119 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 20 May 2003 - 05:45 PM

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:
$ su
< root-password >
# passwd bruno
( 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.

B) Bruno

#120 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 21 May 2003 - 03:24 PM

LOST ROOT PASSWORD

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

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:
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
# 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":
# 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:
# 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:
$ 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 !!

B) Bruno

#121 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 21 May 2003 - 03:59 PM

INSTALLING FIREFOX IN LINUX
Step by step instruction

Because installing Firefox is different from all other install-routines I made a step by step instruction for it.

- Download the file to your "/home/bruno" directory  

You can get the lastest file Here
( Get the one that has Linux and does NOT have "installer" in the name )

After downloading it go to your home directory, open a terminal/console and type
$ su
< password >
# mv firefox* /usr/local/bin/
# cd /usr/local/bin/
# tar -zxvf firefox*

-Log out root: Ctrl+d

-Type "kmenuedit" and you'll get a GUI where you can add an entry in --> Internet --> Web Browsers.

( NOTE: kmenuedit is for KDE based distros . . for distros that use the Gnome desktop use either "alacarte" or the "gnome-menu-editor" )

- Make a new menu entry, call it Firefox and fill in as command: /usr/local/bin/firefox/firefox

-Save

-Close Menudrake

-Close the console

-And have a look in your "menu" it should be there !
( you can drag a shortcut from the menu on your desktop or "taskbar" )

-If everything works okay you can delete the .tar.gz package from /usr/local/bin:
# rm /usr/local/bin/*.tar.gz

Happy browsing !

B) Bruno

PS: See comments ( and extra tips ) on these instructions Here

Edited by securitybreach, 25 March 2013 - 11:26 AM.


#122 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 21 May 2003 - 07:09 PM

THE TRICKS IN KDE ¨HOME¨
( most of these only in Mandrake)


As you klick on the Home icon on your desktop konqueror will open and show you the contents of /home. Right clicking on an empty space and selecting ¨new¨ will give you a context menu with several choices, at the bottom you will see the most interesting ones: ¨Link to application¨ and ¨Link to harddisk¨.

Lets start with the last one, imagine you want to access your windows partition very often, a direct link to your ¨C¨ drive might come in handy.
Rightclick, select ¨new¨ and choose ¨harddisk¨ , a window will pop up, on the first tab you fill in ¨Win C¨ and on the last tab you look for the partition of your C-drive. Click O.K. And youre done !

Now the ¨link to application¨, Lets suppose that you want to be able to start your favorite game while browsing your /home directory you can do the same as above but you have to know the ¨path¨ to the application.

Rightclick on an ISO file and you can directly choose to burn it to CD

Rightclick on a zipped file and you can unzip it.

Rightclick a directory or file to zip it.

Drag a file, link or directory on the ¨Desktop icon¨ and it will put a link on your desktop.

Point with your mouse to a sound file ( wav, mp3, ogg ) and you´ll hear music. ( if preview is enabled, see below )

Next to all this fun you can choose preview in the ´view¨ menu to have thumbnails from all your pictures, text documents, html files etc.

Put a music CD in your drive, click on the yellow star in the side bar and you can rip the CD to ogg files in seconds.
Acces the KDE ftp sites by clicking on the globe in the same sidebar.

Konquror is a great FTP client and sure you can use konqueror to browse the net too.

There is much much more to tell about konqueror. Send me tips in a PM and I´ll edit them in the text.


Posted Image Bruno

#123 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 22 May 2003 - 04:06 PM

BACKUP your WINDOWS in LINUX


If you have enough space on your linux partition you can make a full backup of your Windows ! ( no Ghost-image needed )
And easy to restore if you ever need to. ( would not be the first time would it ? )

Here is what we do, first we have a look if we have enough space:
$ df -h | grep /win

Look at the second number, the first is the total space, the second the used space the third is the available space on your C drive.

Then do a:
$ df -h

To see where there is enough space in your /home or /backup partition.

Now the fun starts :
$ cp -p /mnt/win_c /home/bruno/backup/
(or wherever you want to save the backup)

That´s it ! Easy as pie. Backup is made, you´re safe from fatal injuries.

To restore: Delete all the files on your C partition ( do this in Linux ) and:
$ cp -p /home/backup/win_c /mnt/

and tell it to overwrite the existing win_c if it asks you !

You can also restore just one file ( registry ) or just all the \system files.

NOTE: The -p argument preserves the time and date stamps of the files.

To save space you could also compress the files, time and date will stay in tact without any added argument:

Quote

Peachy @ Forum 2003
Another alternative is to use tar to create a compressed image of your Windows partition:

$ tar -cvzf win_backup.tar.gz /mnt/win_c

This command will do it because the -z parameter will automatically use gzip to do the compression.

To restore you simply do "tar -xvzf win_backup.tar.gz"

Posted Image Bruno

#124 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 23 May 2003 - 04:05 PM

DMESG: DEBUG MESSAGES


Now after 59 tips, for once we will go into something more complicated, I´ll keep it short because there are other people who can explain this far better to you.

The command:
$ dmesg >message.txt

This will make a text file in your home directory, a long file of messages where in case of troubles with your computer you could look for information.
A good site to help you understand those debug messages is:

http://linuxgazette....59/nazario.html

My advice: execute the command and give the text file a glance, just so you know what ¨dmesg¨ can do for you. As long as your computer runs O.K. don´t bother with the fineprint, but in case of serious problems go in there head first !

Posted Image Bruno

PS: there is more interesting things to read on that site.

#125 OFFLINE   Peachy

Peachy

    Anarquista De Sartorial

  • Forum Moderators
  • 5,378 posts

Posted 25 May 2003 - 02:17 PM

Bruno, on May 22 2003, 04:06 PM, said:

BACKUP your WINDOWS in LINUXIf you have enough space on your linux partition you can make a full backup of your Windows ! ( no Ghost-image needed )And easy to restore if you ever need to. B) ( would not be the first time would it ? )Here is what we do, first we have a look if we have enough space:$ df -h | grep /winLook at the second number, the first is the total space, the second the used space the third is the available space on your C drive.Then do a:$ df -hTo see where there is enough space in your /home or /backup partition.Now the fun starts :$ cp -p /mnt/win_c /home/bruno/backup/ ( or where ever you want to save the backup )That's it ! Easy as pie. Backup is made, you're safe from fatal injuries.To restore: Delete all the files on your C partition ( do this in Linux ) and:$ cp -p /home/backup/win_c /mnt/and tell it to overwrite the existing win_c if it asks you !You can also restore just one file ( registry :) ) or just all the \system files.NOTE: The -p argument preserves the time and date stamps of the files.To save space you could also compress the files, time and date will stay in tact without any added argument.We Linux users like to keep our Windows clean ! :):) Bruno
Another alternative is to use tar to create a compressed image of your Windows partition. Really useful if you are tight on space.

'freedom...is actually the reason that men live together in political organisations at all. Without it, political life as such would be meaningless. The raison d'Être of politics is freedom, and its field of experience is action'.
My Flickr Photo Blog Posted Image
del.icio.us bookmarks Posted Image





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users