Best of Tech Support

Our experts answer your technical questions.
Fixing ext2 Filesystem Damage

Question: after a power blackout I am having trouble with my drive. I am using the ext2 filesystem. With the help of the tomsrtbt floppy distribution and a couple of documents from the LDP, I have been able to boot in single-user mode. But when I try to execute the network script, the system sticks after echoing the following:

Disabling IPv$ packet forwarding
sysctl: ip forwarding off

What can I try next?

—Roberto Kruse, rkruse@ieee.org

I would advise you to boot from a rescue disk and run an e2fsck on the partitions of your damaged hard disk for an automatic check:

e2fsck -p -v /dev/<partition_to_fix>

Keep in mind that messing around with your disk, even with fsck and e2fsck, may result in loss of data, so be careful that you understand what you are about to do.

—Felipe E. Barousse Boué, fbarousse@piensa.com

You can try booting Linux with linux single or linux init=/bin/bash if all else fails. Type this at the LILO prompt. After that, you can look at the output of rpm -Va, which should tell you which packages have modified or missing files, and you can then re-install the said packages (with rpm -U --force /location/of/package.rpm) All that said, it's probably as good a time as any to upgrade your system to the latest Red Hat version, which should also fix your problem in the process.

—Marc Merlin, marc@merlins.org

How to Mount a USB Device?

I would like to access a Disgo 16MB USB Flash RAM device from Mandrake Linux. Will Linux automatically mount this device? If so, how can I find it?

—Greg, gregory_connor@yahoo.co.uk

I believe that Mandrake uses the usbdevfs pseudo-filesystem, though I don't know where it mounts. Type mount to see. My Red Hat machine mounts it on /proc/bus/usb.

—Ben Ford, ben@kalifornia.com

Linux supports USB storage devices if you have a recent kernel version. According to Mandrake's web site, they shipped 8.1 with kernel version 2.4.8. However, because the device drivers have evolved quite a bit in the last few months, it may be helpful to update to the latest 2.4.x version, which at the time of this writing is 2.4.18. You will need both the USB device filesystem and SCSI generic support. Then, check out the Linux USB Guide (linux-usb.sourceforge.net/USB-guide/book1.html). The “mass storage” section should be helpful.

—Chad Robinson, crobinson@rfgonline.com

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

mount usb

Anonymous's picture

simply type: mount /dev/sda1 /somewhere

Re: Best of Tech Support

Anonymous's picture

Here is a script (sanitized) that I use to post my IP address. You can easily modify it to send an email instead of uploading a web page. Then just add it to your crontab to run as often as you want. Here's the URL where you can see the results of the script: http://home.hawaii.rr.com/nelsongarcia/myip.html

Aloha,

Nelson Garcia

#!/usr/bin/expect -f

set ftpserver "yourftpserver.com";

set username "yourusername";

set userpass "yourpassword";

set tmpfile "/tmp/myip";

set pubfile "myip.html";

set ifconf "/sbin/ifconfig";

set ip [exec $ifconf eth0]

set indx [string first "inet addr" $ip]

set indx [expr $indx +10]

set ip [string range $ip $indx end]

set indx [string first " " $ip]

set indx [expr $indx -1]

set ip [string range $ip 0 $indx]

set systime [clock seconds]

set datestrng "Last updated: [clock format $systime -format %H:%M:%S] - [clock format $systime -format {%B %d, %Y}]"

set toout [open "$tmpfile" w];

puts $toout "<html><head><title>My IP Address</title></head><body>";

puts $toout "<h1>My current IP is: <a href='http://$ip'>$ip</a><br>$datestrng </h1>";

puts $toout "<hr><h2>Warning</h2><br>Please do not bookmark any pages on my home server using the IP address as it is subject to change.";

puts $toout "<br>If the time above appears old, it probably means that my server is down and that you should not follow the link.";

puts $toout "<br><hr>Mail comments to <a href='mailto: '>Me</a>.</body></html>";

close $toout;

spawn ftp "$ftpserver"

expect "Name*:"

send "$username\r"

expect "Password:"

send "$userpass\r"

expect "ftp>"

send "put $tmpfile $pubfile\r"

expect "ftp>"

send "quit\r"

close

puts "\n"

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState