Terminus Logo  Secured by phpPhobos

Shadow Family   
  Login  - No Account?  Create One   
Search 
Friday, 26 April 2024  -
News FeedRSS Feed
rss rdf  
  Home 
  Authentication 
 Documentation 
    Site Documentation 
    About me 
  Legal Notice 
 Applications 
    Web Links 
 Hobbies 
    RC Models 
    RC Batteries 
    Build blogs 
 Modules 
    Downloads 
    Weblinks 
 Blacklists 
    Blacklist 
    Blockout 
    DNS Blacklist 
 Registered Bloggers 
  Joerg's Blog 
 Gallery [Listing]
  > Diving 
  > Steampunk 
  > RC Planes 
  > FPV Drones 
  > Indy travels 
 FAQ  [ Topics  ]
 Common Linux problem... 
 Routerboard RBxxxAH 
 Apple Mac-mini 
 PHP Phobos 
 Stargate's Backup sc... 
 eBook Reader / PRS-5... 
 RC Models 
 Server in SolLan 
Terminus's FAQ   [  Topics  | Groups  | Last  | Expand  | Search  | Print  | Documentation ]
Folder open  Linux General [ Expand ]
  Question ?  LILO won't boot. I get LI   
  Question ?  How can I boot from the SATA drive 2 of a Software Raid-1 System ?   
  Question ?  How does SATA Raid work ? Fake or real raid ...   
  Question ?  Logitech MX700 mouse configuration with XOrg   
  Question ?  How can I reboot the Linux system without access to the disks ?   
  Question ?  How do I prepare the SUSE 10.0 source for compiling an external module ?   
  Question ?  Logitech MX700 Keyboard configuration for XOrg   
  Question ?  Thunderbird E-Mail Header extension   
  Question ?  How can I do some network troubleshooting ?   
  Question ?  How to reinstall grub from a rescue mode ?   
  Question ?  How can I mount a SMB share under linux ?   
spacer line
Folder open  Answers
spacer line
Question ? LILO won't boot. I get LI   [
View DetailsView details
|
Print ViewPrint view
]

 The problem lies in the Harddisk geometry the BIOS passes to the LILO loader. Unfortunatly, when booting from a normal install, you sometime get your Harddisks parameteres read in LBA, CHS or Large form, this due to the new read of the Partition tables when you changed the partition informations. If the BIOS gave in the harddisk geometry data in LBA, the system will reread the Harddisk geometry in CHS mode, thus the boot will fail.

So, to get this working right, go into the CMOS Setup of your Mainboard, and play around with the Translation Method. Mostly after this error to happen - LARGE or CHS will fix the problem. 

Entered by smurphy on Thursday, 01 September 2005 @ 21:34:55  
Linux General - Common Linux problems, # Hits: 99828
spacer line
Question ? How can I boot from the SATA drive 2 of a Software Raid-1 System ?   [
View DetailsView details
|
Print ViewPrint view
]

 As configuration starting point - here is the setup as found on my server:
/dev/sda - Primary S-ATA drive
/dev/sdb - Secondary S-ATA drive

Note that both drives are master drives - as S-ATA does not handle Primary/Secondary stuff.
Having the System up and running - the partitions look like this - assuming they are setup already:

Filesystem            Size  Used Avail Use% Mounted on
/dev/md0              380M   75M  267M  22% /
/dev/md1               76M  9.8M   63M  14% /boot
/dev/md2              2.9G  378M  2.3G  15% /home
/dev/md5               26G   11G   13G  48% /home/Share
/dev/md6              981M  132K  881M   1% /tmp
/dev/md3              2.0G  1.3G  476M  73% /usr
/dev/md4              4.4G  1.3G  2.7G  32% /var

Note that the Primary root partition is md0 and the boot partition md1. This will be important in the grub-configuration later on.
The following grub.conf file has the following features:
- Has several harddisks to boot from
- uses fallback to jump to the next harddrive in case the first one fails
- prepares the connection of a serial console, while also displaying all stuff on tty0

Assuming you have the following grub.conf file in your /boot partition - which is md1:

# Boot automatically after 30 secs.
timeout 50

# By default, boot the first entry.
default 0

serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
terminal --timeout=50 serial console

# Fallback to the second entry.
fallback 1

# Splash-Image...
# splashimage=(hd0,0)/grub/splash.xpm.gz

# For booting with disc 0 kernel
title  EpiaN (hd0,1)
kernel (hd0,1)/vmlinuz-2.6.13.2-EpiaN root=/dev/md0 
devfs=nomount acpi=ht resume=/dev/md7 splash=silent
read-only console=ttyS0,115200n8 console=tty0 initrd=(hd0,1)/initrd-2.6.13.2-EpiaN.img # For booting with disc 1 kernel title EpiaN (hd1,1) kernel (hd1,1)/vmlinuz-2.6.13.2-EpiaN root=/dev/md0
devfs=nomount acpi=ht resume=/dev/md7 splash=silent
read-only console=ttyS0,115200n8 console=tty0 initrd=(hd1,1)/initrd-2.6.13.2-EpiaN.img # Mandrake Kernel title linux-i686-up-4GB (hd0,1) kernel (hd0,1)/vmlinuz-2.6.11-6mdk-i686-up-4GB root=/dev/md0 devfs=nomount acpi=ht resume=/dev/md7
splash=silent read-only console=ttyS0,115200n8
console=tty0 initrd=(hd0,1)/initrd-i686-up-4GB.img # Mandrake Kernel title linux-i686-up-4GB (hd1,1) kernel (hd1,1)/vmlinuz-2.6.11-6mdk-i686-up-4GB root=/dev/md0 devfs=nomount acpi=ht resume=/dev/md7
splash=silent read-only console=ttyS0,115200n8
console=tty0 initrd=(hd1,1)/initrd-i686-up-4GB.img # For booting with disc 0 kernel - Failsafe title Failsafe (hd0,1) kernel (hd0,1)/vmlinuz root=/dev/md0 devfs=nomount acpi=ht
resume=/dev/md7 splash=silent failsafe read-only
console=ttyS0,115200n8 console=tty0 initrd=(hd0,1)/initrd.img # For booting with disc 1 kernel - Failsafe title Failsafe (hd1,1) kernel (hd1,1)/vmlinuz root=/dev/md0 devfs=nomount acpi=ht
resume=/dev/md7 splash=silent failsafe read-only
console=ttyS0,115200n8 console=tty0 initrd=(hd1,1)/initrd.img

you would issue the following commands to install grub on your harddisks

grub> root (hd0,1)
 Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd0) 
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  16 sectors are
embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p
(hd0,1)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.

grub> root (hd1,1)
 Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd1) 
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd1)"...  16 sectors are
embedded.
succeeded
 Running "install /boot/grub/stage1 (hd1) (hd1)1+16 p
(hd1,1)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.

That's it. You're done. Please keep in mind - that the command "root (hdx,x)" determins where the /boot partition is to be found. In the grub.conf file - we're using the "hd0(0.1)/vmlinuz" to actually tell grub to get the kernel files etc. from that partition - which is not mounted - thus directly from "/".
Note the order of the bootable kernels. You'll notice that "title EpiaN (hd0,1)" comes first, then "title EpiaN (hd1,1)". Using the "fallback 1" statement make grub fall back to the second entry - in case the first one is not found - making the system kind of automatically boot the alternate raid-1 drive - in case drive 0 is dead. 

Entered by smurphy on Monday, 26 September 2005 @ 20:04:21  
Linux General - Common Linux problems, # Hits: 99358

Attach   grub.conf.txt  [ 1,875 bytes - text/plain ]

Next  How to reinstall grub from a rescue mode ? 
spacer line
Question ? How does SATA Raid work ? Fake or real raid ...   [
View DetailsView details
|
Print ViewPrint view
]

 The short version first:

  • Status of your current setup Yuppers, if you would switch from your current RAID setup to Software RAID, you would have to delete the RAID set in the controller-BIOS (results in complete data loss)
  • MDK tools for RAID setup I don't know what RAID setup utilites come with MDK these days, but you can take it as granted that the kernel comes with SW-RAID support. As it goes for the relation between drives/partitions, logical volumes and all that ... (lean back, relax, this is going to be lengthy

What you have found on the MDK forum is about what I was talking about in my first post ("LVM"/"Software RAID").
In fact, "onboard hardware RAID" - as postulated by the motherboard manufacturers - is in no way a hardware solution. It's a marketing buzz-word, and indeed: you'd probably be better off with a genuine linux software-RAID solution.
The linux SW-RAID-technique is what you might know from Windows as "Dynamic Volumes". Compared to the heapo-onboard solutions SW-RAID has some major advantages. The most interesting one is that you can use partitions for your RAID-volumes instead of whole drives. Time for some rotten ASCII-art, I say :)

Check a detailed explanation here  

Entered by smurphy on Friday, 02 September 2005 @ 00:58:31  
Linux General - Common Linux problems, # Hits: 98709
spacer line
Question ? Logitech MX700 mouse configuration with XOrg   [
View DetailsView details
|
Print ViewPrint view
]

 Support for complicated wheel/button mice has come along nicely in Xorg. Gone are the days of using ImPS/2 or ExplorerPS2 protocols (both Microsoft) to talk to the mouse, we can now use the correct HID event device.
These instructions are for an MX700 mouse that is part of the MX Duo/Cordless Desktop MX bundle. See the note below about the difference between this and a standalone MX700 There are two places that configuration needs to be performed, firstly in the main Xorg config file, then in per-user xmodmap config files. We will start with the Xorg config file
As root, load /etc/X11/xorg.conf into your favorite text editor and look for the mouse section. You want it to look more like this:

Section "InputDevice"
  Identifier "Configured Mouse"
  Driver "mouse"
  option "CorePointer"
  option "Name" "Logitech MX700 cordless mouse"
  option "Device" "/dev/input/mice"
  option "Protocol" "ExplorerPS/2"
  option "ZAxisMapping" "4 5"
  option "Buttons" "7"
  option "ButtonMapping" "1 2 3 6 7"
  option "Resolution" "800"
  option "Emulate3Buttons" "no"
EndSection

Note Finding the right USB device
The options "Dev Name" and "Dev Phys" are specific to the MX Duo/Cordless Desktop MX's dual receiver. If you have a standalone MX700 you can remove the "Dev Phys" option entirely and change the "Dev Name" option to the name of your mouse, as reported by cat /proc/bus/usb/input/devices Looking at the mouse you might ask why I have configured 10 buttons when it clearly only has 8. The answer is that scroll-up and scroll-down both count as buttons, so it is 10. Three button emulation is disabled because this mouse has 3 main buttons and the 800dpi resolution option is probably ignored, but in theory should be possible.

The second file we must edit is a per-user configuration file. In each user's home directory, create a file called .Xmodmap with the following in it:

pointer = 1 2 3 6 7 8 9 10 4 5

This should ensure that the scrolling buttons are correctly configured when X is loaded, however, if scrolling does not work you may need to run xmodmap ~/.Xmodmap (or place that command in an X startup script).
Restart X and you should have working scrolling and mouse button mapping tools should be able to use the extra buttons. 

Entered by smurphy on Sunday, 07 January 2007 @ 22:37:12  
Linux General - Common Linux problems, # Hits: 98600

Next  Logitech MX700 Keyboard configuration for XOrg 
spacer line
Question ? How can I reboot the Linux system without access to the disks ?   [
View DetailsView details
|
Print ViewPrint view
]

 Most of the time - you can still access the proc-file system, and access the sysreq-trigger file issue the command:

echo b > /proc/sysrq-trigger

and, using b as command, it will reboot your System.
Check the attached file for a complete description
Here the commands you could use.

'r'     - Turns off keyboard raw mode and sets it to XLATE.

'k'     - Secure Access Key (SAK) Kills all programs on the current virtual
          console. NOTE: See important comments below in SAK section.

'b'     - Will immediately reboot the system without syncing or unmounting
          your disks.

'o'     - Will shut your system off (if configured and supported).

's'     - Will attempt to sync all mounted filesystems.

'u'     - Will attempt to remount all mounted filesystems read-only.

'p'     - Will dump the current registers and flags to your console.

't'     - Will dump a list of current tasks and their information to your
          console.

'm'     - Will dump current memory info to your console.

'v'	- Dumps Voyager SMP processor info to your console.

'0'-'9' - Sets the console log level, controlling which kernel messages
          will be printed to your console. ('0', for example would make
          it so that only emergency messages like PANICs or OOPSes would
          make it to your console.)

'f'	- Will call oom_kill to kill a memory hog process

'e'     - Send a SIGTERM to all processes, except for init.

'i'     - Send a SIGKILL to all processes, except for init.

'l'     - Send a SIGKILL to all processes, INCLUDING init. (Your system
          will be non-functional after this.)

'h'     - Will display help ( actually any other key than those listed
          above will display help. but 'h' is easy to remember :-)

 

Entered by smurphy on Wednesday, 31 August 2005 @ 21:33:20  
Linux General - Common Linux problems, # Hits: 98574

Attach   sysrq.txt  [ 10,208 bytes - text/plain ]
spacer line
Question ? How do I prepare the SUSE 10.0 source for compiling an external module ?   [
View DetailsView details
|
Print ViewPrint view
]

 After installing the kernel-source rpm - perform the following steps:

# cd /usr/src/linux
# make mrproper
# make cloneconfig
# make modules_prepare

after that - you can compile an external module 

Entered by smurphy on Sunday, 16 April 2006 @ 23:52:09  
Linux General - Common Linux problems, # Hits: 98473
spacer line
Question ? Logitech MX700 Keyboard configuration for XOrg   [
View DetailsView details
|
Print ViewPrint view
]

 All of the configuration for the keyboard is performed within the main Xorg config file. As root, load /etc/X11/xorg.conf into your favorite text editor and look for the keyboard section. You want it to look more like this:

Section "InputDevice"
   Identifier      "Logitech Elite Keyboard"
   Driver          "keyboard"
   Option          "CoreKeyboard"
   Option          "XkbRules"      "xorg"
   Option          "XkbModel"      "logiinkseusb"
   Option          "XkbLayout"     "us"
   Option          "XkbVariant"    "intl"
EndSection

The logiinkseusb is not strictly the exact map for this keyboard, but it is awfully close and it is included in Xorg, so there is no need to start editing complicated xkb files. You will want to change the XkbLayout option to the correct country code for your keyboard.
Restart X and you should be able to map all the buttons on your keyboard with the correct names, using something like Gnome's Keyboard Shortcuts preferences item
Kindly taken from the following Howto 

Entered by smurphy on Sunday, 07 January 2007 @ 22:36:17  
Linux General - Common Linux problems, # Hits: 98409

Next  Logitech MX700 mouse configuration with XOrg 
spacer line
Question ? Thunderbird E-Mail Header extension   [
View DetailsView details
|
Print ViewPrint view
]

 To have a standard E-Mail Header view with scrollbar while using Thunderbird to read E-Mails - get the Header Scroll Extension and add the following to the default configuration of thunderbird:
Edit - Advanced - General - Config Editor
and add the following Integer Value:
mail.headerScroll.maxheight
with a value of 100. Will make mail reading way easyer.  

Entered by smurphy on Sunday, 15 October 2006 @ 22:29:01  
Linux General - Common Linux problems, # Hits: 98325
spacer line
Question ? How can I do some network troubleshooting ?   [
View DetailsView details
|
Print ViewPrint view
]

 

  • TCPDump

    tcpdump -i [Network-Device] host [IP-Address]
    

    In case you want to filter more specifically, b.e. filter on host and protocol, use this

    tcpdump -i [Network-Device] -x 'ip host [hostname] and port http'
    

  • Ethereal
    Note that newer versions are called wireshark for the GUI Based tool, the CLI based tool is called tshark - replace were appropriate

    tethereal -i [Network-Device]
    

    If you want to limit on a specific IP-Address, b.e. your workstation IP, use the following

    tethereal -i [Network-Device]  -R ip.addr==[IP-Address]
    

    and if you have the webserver running on a different port as 80 - tell ethereal what tcp-port to interprete as http traffic with the following

    tethereal -i [Network-Device]  -d tcp.port==[Port-Nr],http -R ip.addr==[IP-Address]
    

    Another easy way to filter is:

    tethereal -i [Network-Device] host [host-IP] and port [Port-Nr.]
    

    If you want to dump the output to a file - append: -w output.dump to these strings - and you'll have all data dumped to these files - you can later read/open with ethereal for analisys.

  • IPtraf - provides you an easy way to identify non clean traffic. This means, even if tethereal and tcpdump show you some data, iptraf will not show you a packet count increase in case the data is valid, e.g. a wrong setup VLAN (Unidirectional traffic, missing parts of the tcp/ip traffic messages etc.

  • In case you have https-traffic to monitor - you can use ssldump to have a look at the traffic. this troubleshooting method is also very keen in case you see loads of ssl-decode errors. Try out the following:

    ssldump -ni eth1 -d -k [pem-key] host [host-ip]
    

  • A very keen solution is to also tunnel the traffic from your workstation into an internal machine - to have a specific IP-Address to filter through the advanced recorder. This can be reached by using ssh in tunnel mode from your local machine (note that you'll need a local cli-based ssh solution on the workstation you are working from:

    ssh -L [client-IP]:[client-Port]:[remote-IP]:[remote-port]
    

    once done - connect to the application by using http://localhost[client-port]

 

Entered by smurphy on Tuesday, 21 October 2008 @ 09:43:36  
Linux General - Common Linux problems, # Hits: 95840
spacer line
Question ? How to reinstall grub from a rescue mode ?   [
View DetailsView details
|
Print ViewPrint view
]

 Boot into a ubuntu "try" mode or whatever linux system that provides you the possibility to manipulate the harddisk.
You first need to prepare the environment

root@ubuntu:~# mkdir /sda
root@ubuntu:~# mount /dev/sda3 /sda    # this is the / of the existing system
root@ubuntu:~# mount -o bind /dev /sda/dev
root@ubuntu:~# mount -o bind /proc /sda/proc
root@ubuntu:~# chroot /sda /bin/bash
[root@ubuntu /]# mount /dev/sda1 /boot

Then - Install GRUB

[root@ubuntu /]# grub

    GNU GRUB  version 0.95  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]

grub> root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/e2fs_stage1_5" exists... yes
 Running "embed /grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
succeeded
 Running "install /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/grub.conf"
 \ ... succeeded
Done.

grub>quit
[root@ubuntu /]#

After that - undo whatever you have done in reverse order

[root@ubuntu /]# umount /boot
[root@ubuntu /]# exit
root@ubuntu:~# umount /sda/proc
root@ubuntu:~# umount /sda/dev
root@ubuntu:~# umount /dev/sda3

If you reboot - you should see a grub prompt as usual. 

Entered by smurphy on Friday, 15 October 2010 @ 11:25:36  
Linux General - Common Linux problems, # Hits: 88875

Next  How can I boot from the SATA drive 2 of a Software Raid-1 System ? 
spacer line
Question ? How can I mount a SMB share under linux ?   [
View DetailsView details
|
Print ViewPrint view
]

 Sometimes, on old systems, we need to mount a samba-share.
Create a file: /etc/cifs.pwd with

~#touch /etc/cifs.pwd
~#chmod 600 /etc/cifs.pwd

And add in that file the login/password file. Content Format is very simple - as follow:

username=smbuser
password=smbpassword

Password/username is in cleartext !

After that - you can mount the share as root with:

~#mount -t smbfs -o credentials=/etc/cifs.pwd  //REMHOSTIP/remotedir /localdir

In this example, /remotedir is the remote Directory/Share and /localdir is the local Directory you mount it in on your local file system. This localdir needs to exist on you local machine.

Example:
Assume the Samba Host is: 192.168.101.56
Remote Share is: /smbtmp
Local mount Directory is: /mnt/smbtmp

We would have:

~#mount -t smbfs -o credentials=/etc/cifs.pwd //192.168.101.56/smbtmp /smb/smbtmp

To make it easy - you add the data to the /etc/fstab file.

//192.168.101.56/smbtmp /mnt/smbtmp smbfs credentials=/etc/cifs.pwd

With this, a simple: "~#mount /mnt/smbtmp" is be enough to mount the samba share.  

Entered by smurphy on Tuesday, 16 November 2010 @ 11:08:52  
Linux General - Common Linux problems, # Hits: 88480
 
Problems to  webmaster(-AT-)solsys(-DOT-)org  - best viewed @ 1920bpp
This site is powered by phpPhobos v2.0b446
© J. Mertin smurphy(-AT-)solsys(-DOT-)org 
Icons - Copyright Breeze artists GPL 2+