Page 6 of 6

Re: Unix noob adventures

Posted: Wed Feb 04, 2009 9:15 pm
by flip-mode
Forge wrote:
Thought nothing much of it at the time, but that command would give most Ubuntu users a hernia, if not panic attacks.
And there is nothing wrong with that really. It is kind of nice that there is a Unix dist for the layman. I would love to get very sophisticated and knowledgeable about running nixes from the CLI, but until that happens it is nice to know that Ubuntu installs a fully functional desktop set to automatically update the whole system. There is much to like about that. My mom could literally use Ubuntu. In fact, it is my opinion that the Gnome desktop environment in Ubuntu 8.10 is a lot more intuitive than any Version of Windows or Apple's OS ever has been.

Re: Unix noob adventures

Posted: Wed Feb 04, 2009 9:28 pm
by Crayon Shin Chan
flip-mode wrote:
Forge wrote:
Thought nothing much of it at the time, but that command would give most Ubuntu users a hernia, if not panic attacks.
And there is nothing wrong with that really. It is kind of nice that there is a Unix dist for the layman. I would love to get very sophisticated and knowledgeable about running nixes from the CLI, but until that happens it is nice to know that Ubuntu installs a fully functional desktop set to automatically update the whole system. There is much to like about that. My mom could literally use Ubuntu.


And that is why I switched back to Windows. After all that fussing about and worrying how to keep the computer busy compiling the entire night (you have no idea how many hours of sleep I lost over compiling and worrying about what to compile and why it doesn't compile, or if you want a non-Gentoo example, trying to get my internet connection up so I can figure out what Kopete actually does, where *'s files are, where so and so's config file is, fussing about not finding inetd in /etc/init.d/ - later I found it was actually called openbsd-inetd), I came to the conclusion that this simply wasn't necessary. There are tons of things to do on my computer besides getting it to work. Thinking back, I learned a lot and I earned bragging rights, but in the big picture, it was a waste of time.

Re: Unix noob adventures

Posted: Wed Feb 04, 2009 9:31 pm
by flip-mode
Crayon Shin Chan wrote:
And that is why I switched back to Windows. After all that fussing about and worrying how to keep the computer busy compiling the entire night (you have no idea how many hours of sleep I lost over compiling and worrying about what to compile and why it doesn't compile), I came to the conclusion that this simply wasn't necessary. There are tons of things to do on my computer besides getting it to work. Thinking back, I learned a lot and I earned bragging rights, but in the big picture, it was a waste of time.
Well, not to be rude, but maybe you should start a "Switched back to Windows" thread for that discussion :wink:

Re: Unix noob adventures

Posted: Wed Feb 04, 2009 9:41 pm
by bthylafh
Forge wrote:
Thought nothing much of it at the time, but that command would give most Ubuntu users a hernia, if not panic attacks.


Made me snicker. I don't have to waste all those keystrokes to make the system work; a simple "sudo aptitude update && sudo aptitude safe-upgrade" sorts me out, and it takes hours (or days) less time than a recompile.

Re: Unix noob adventures

Posted: Wed Feb 04, 2009 9:45 pm
by Crayon Shin Chan
flip-mode wrote:
Crayon Shin Chan wrote:
And that is why I switched back to Windows. After all that fussing about and worrying how to keep the computer busy compiling the entire night (you have no idea how many hours of sleep I lost over compiling and worrying about what to compile and why it doesn't compile), I came to the conclusion that this simply wasn't necessary. There are tons of things to do on my computer besides getting it to work. Thinking back, I learned a lot and I earned bragging rights, but in the big picture, it was a waste of time.
Well, not to be rude, but maybe you should start a "Switched back to Windows" thread for that discussion :wink:

Don't worry, I think I'm not hijacking.

Re: Unix noob adventures

Posted: Wed Feb 04, 2009 10:18 pm
by flip-mode
Alright, so I have a real question here. To recap, I have Ubuntu 8.10 Server on a particular machine. I have plugged a USB hard drive in it. I've poked around, looking for how to mount this thing. So I think the proper mount command is

mount -t msdos /dev/sg0 /mnt


or should I use usbfs instead of msdos?

Also, is sg0 the right device? Heh....

Here is what ls tells me:

flip-mode@socute:~$ ll /dev/s*
brw-rw----+ 1 root cdrom 11,   0 2009-02-02 20:17 /dev/scd0
brw-rw----  1 root disk   8,   0 2009-02-02 20:17 /dev/sda
brw-rw----  1 root disk   8,   1 2009-02-02 20:17 /dev/sda1
brw-rw----  1 root disk   8,   2 2009-02-02 20:17 /dev/sda2
brw-rw----  1 root disk   8,   5 2009-02-02 20:17 /dev/sda5
crw-rw----  1 root disk  21,   0 2009-02-02 20:17 /dev/sg0
crw-rw----  1 root cdrom 21,   1 2009-02-02 20:17 /dev/sg1

Re: Unix noob adventures

Posted: Wed Feb 04, 2009 10:31 pm
by Crayon Shin Chan
usbfs is what you get in /proc/bus/usb, totally different. I don't think you need to specify the type unless it fails - for FAT*, use vfat, I think msdos refers to FAT's ancestor. Unplug the stick, plug it in again, run dmesg|tail to find any new lines, and it'll tell you which device node it is.

http://en.wikipedia.org/wiki/File_syste ... ft_Windows

Re: Unix noob adventures

Posted: Wed Feb 04, 2009 10:43 pm
by bitvector
flip-mode wrote:
or should I use usbfs instead of msdos?

Also, is sg0 the right device? Heh....

You shouldn't need to specify the FS type, but sg0 is a SCSI generic device -- not what you're looking for in most cases. sd[a-z] are SCSI disk devices representing the whole drive and then you add a number at the end to specify a particular partition (1-4 will be the primary partitions and 5-whatever will be logical and extended partitions). Looking at the list of devices you have there, you have sda, which represents the whole disk, sda1 and sda2 are primary partitions and sda5 is an extended partition. You typically are looking to mount a partition even if the drive only has one partition. You can do fdisk -l or cat /proc/partitions (as a superuser) to see a list of detected partitions that you could potentially mount.

Re: Unix noob adventures

Posted: Wed Feb 04, 2009 11:35 pm
by titan
Forge wrote:
emerge -uDa gcc && emerge -C gcc-4.1.2 && gcc-config 1 && source /etc/profile && cp /etc/make.conf.core2 /etc/make.conf && emerge -e world && emerge -uDa world && emerge -uDa gnome && cd /usr/src/linux && make clean && cp /boot/current.cfg /usr/src/linux/.config && make oldconfig && make && make modules && make modules_install && make install && shutdown -r now


One problem I see with that command if you wanted it to be truly unattended...don't use the a option.

Re: Unix noob adventures

Posted: Thu Feb 05, 2009 6:47 am
by flip-mode
Crayon Shin Chan wrote:
run dmesg|tail to find any new lines, and it'll tell you which device node it is.
Nice. Here is what I get:

flip-mode@socute:~$ dmesg | tail
[160989.410054] usb 1-1: device descriptor read/64, error -71
[160989.650053] usb 1-1: device descriptor read/64, error -71
[160989.880047] usb 1-1: new full speed USB device using uhci_hcd and address 4
[160990.010068] usb 1-1: device descriptor read/64, error -71
[160990.250059] usb 1-1: device descriptor read/64, error -71
[160990.480047] usb 1-1: new full speed USB device using uhci_hcd and address 5
[160990.900047] usb 1-1: device not accepting address 5, error -71
[160991.020058] usb 1-1: new full speed USB device using uhci_hcd and address 6
[160991.440048] usb 1-1: device not accepting address 6, error -71
[160991.440160] hub 1-0:1.0: unable to enumerate USB device on port 1


which explains why I was only able to find sda :(

Re: Unix noob adventures

Posted: Thu Feb 05, 2009 9:21 pm
by flip-mode
fdisk -l

That was all I needed to know.

Well, I feel like learning how to determine and mount file systems is an encouraging milestone. Yay :P

Re: Unix noob adventures

Posted: Thu Feb 05, 2009 10:37 pm
by Forge
titan wrote:
One problem I see with that command if you wanted it to be truly unattended...don't use the a option.


That's what I get for typing it from memory. My fingers sometimes try to substitute -uDa for -uD in long commands, too.

Re: Unix noob adventures

Posted: Wed Apr 15, 2009 8:34 pm
by flip-mode
4/15/09 update.

It has been a disappointing two months with regards to my Unix adventures, but recently things have been looking up. For starters, I was going to build a home server with a cheap-o CPU/mobo bundle from Newegg and put either Ubuntu or FreeBSD on it. Well, the hardware failed the first time, so I RMA'd, and the replacement hardware started flaking out too. So I just returned it and dropped the thought of a cheap-o build. I don't have a machine sitting around that is suitable for what I want to do - which is mainly serve files and a home web site. So I have no home server for now. Some day....

But, at work, I've been able to play around some recently. We have a web server that is hosted, but we can still SSH into the thing when we need to, and recently we have needed to. You see, our website is one of the most pathetic things ever. So we've been trying to clean it up on the cheap (hopefully that will go better than my home server on the cheap initiative). And I was able to grab a spare machine from work and have brought it home and put Ubuntu Server 8.04 on it. I'm using it to fool around and stay familiar. The nice part is that after the short hiatus, things seem to make much more sense than before. Installing programs from the command line using aptitude has been a pretty successful expreience - not nearly as frustrating as FreeBSD. And, on that note, I've pretty much decided to set FreeBSD aside, just because Ubuntu Server has seemed so much easier to use.

I've started using vi just because it is pretty much guaranteed to be on every *nix machine out there. Neither ee or nano is on work's web server, but vi is.

I've gotten the hand of most of the basic stuff - aptitude, chmod, chgrp, chown. I've got some nice though novice customizations of the .bashrc file going (alias ls='ls --color=auto --group-directories-first -p' is one of my favorite tweaks).

And that pretty much sums up recent events. :)

Re: Unix noob adventures

Posted: Fri Apr 17, 2009 6:48 am
by sub.mesa
In all my experiences, FreeBSD proved a more "just works" mentality than any Linux experience i've ever had. Although installing FreeBSD is not as sleek with a graphic installer etc, the actual setup of FreeBSD is piece of cake with ports tree.

Why don't you download Virtualbox and play with both linux and bsd in a VM? That can't hurt your hardware, and you could start straight away since Virtualbox (open-source VMware clone) is free. In all cases, you need proper documentation. The FreeBSD handbook tells you pretty much everything you need. Could you give me some feedback why you had so much trouble?

Re: Unix noob adventures

Posted: Fri Apr 17, 2009 7:17 am
by just brew it!
sub.mesa wrote:
In all my experiences, FreeBSD proved a more "just works" mentality than any Linux experience i've ever had. Although installing FreeBSD is not as sleek with a graphic installer etc, the actual setup of FreeBSD is piece of cake with ports tree.

I agree that dealing with rpm-based package management (as used on Redhat, SuSE, and their derivatives) can be problematic. Front ends (like Redhat's yum) help to an extent, but I've found package management to to be the weak point (and source of most of the frustration) on these distros.

Deb/apt on the other hand, "just works". I've been quite pleased with the package management system on Ubuntu, and would argue that it also qualifies for "piece of cake" status when it comes to setup.

Re: Unix noob adventures

Posted: Fri Apr 17, 2009 8:59 am
by flip-mode
just brew it! wrote:
sub.mesa wrote:
In all my experiences, FreeBSD proved a more "just works" mentality than any Linux experience i've ever had. Although installing FreeBSD is not as sleek with a graphic installer etc, the actual setup of FreeBSD is piece of cake with ports tree.
I've been quite pleased with the package management system on Ubuntu, and would argue that it also qualifies for "piece of cake" status when it comes to setup.
Yep, for me at least, I had trouble with the ports. A few of them were nowhere close to "just working" and I was never able to get them to work. Being a complete noob, I was probably doing something simple, or 5 somethings simple, wrong, and if I'd have just known this or that little thing I could have gotten the ports to install flawlessly. IIRC, I got 3 or 4 ports installed without issue, but had trouble with other ports. Aptitude in Ubuntu has been surprisingly easy to use and I have yet to not be able to install something.

All of that is no knock against FreeBSD, rather, it is just to say that it was taking more time to learn than Ubuntu, and it was enough of a frustration that, coupled with the fact that the web server at work is Linux, I decided to focus on Ubuntu Server.

Re: Unix noob adventures

Posted: Fri Apr 17, 2009 9:32 am
by just brew it!
Yeah, I've got nothing against FreeBSD. In fact, from the perspective of security, stability, and performance in network infrastructure type applications, it is likely superior to Linux. But that doesn't mean it is the right choice for everyone.

The line between the two is becoming increasingly blurry though -- Debian is now capable of running on top of the FreeBSD kernel. My head hurts. Interesting times we live in here... :D

Re: Unix noob adventures

Posted: Fri Apr 17, 2009 9:42 am
by flip-mode
just brew it! wrote:
Yeah, I've got nothing against FreeBSD. In fact, from the perspective of security, stability, and performance in network infrastructure type applications, it is likely superior to Linux. But that doesn't mean it is the right choice for everyone.

The line between the two is becoming increasingly blurry though -- Debian is now capable of running on top of the FreeBSD kernel. My head hurts. Interesting times we live in here... :D
Your much smarter than I am, my head started hurting a long time ago.

Re: Unix noob adventures

Posted: Fri Apr 17, 2009 11:03 am
by sub.mesa
flip-mode wrote:
All of that is no knock against FreeBSD, rather, it is just to say that it was taking more time to learn than Ubuntu, and it was enough of a frustration that, coupled with the fact that the web server at work is Linux, I decided to focus on Ubuntu Server.

Fair enough, you should pick something that works and if you already have familiarity with Linux servers it would make perfect sense.

And i agree Ubuntu's synaptic/apt-get works nice, though it tends to have outdated versions now and then, while FreeBSD is usually swift with new versions like PHP, MySQL, Apache, and so on. But that doesn't need to be an issue, both Linux and BSD can get the job done fine.

Reasons for me to prefer BSD are:
- access to advanced technology like ZFS (same feature level as OpenSolaris as of FreeBSD 8-CURRENT - aimed at august 2009 release. Or 7.2 for a more basic ZFS version)
- access to high-speed RAID and storage layers working on the GEOM I/O framework; RAID0, RAID1, RAID3/4/5 are all possible
- good and clean working ports, with available customizations
- generally higher SMP performance (important for servers)

A real tradeoff is that while FreeBSD has a good handbook discussing all standard operations, it doesn't have as much good how-to's on the net as linux does. Also hardware support might be behind that of Linux's, which is now on a very good level. But FreeBSD is catching up, and lets hope 8.0 will get released quickly, as ZFS is really a smile to work with. :)

Re: Unix noob adventures

Posted: Fri Apr 17, 2009 6:25 pm
by bitvector
sub.mesa wrote:
- generally higher SMP performance (important for servers)

I would disagree with "generally higher." I'd say it's more of a wash. For a long time, FreeBSD's SMP performance was nowhere near Linux's, but FreeBSD caught up in many ways with the development of 7. Jeff Roberson, the FreeBSD kernel dev working on ULE (the new SMP scheduler), did some database benchmarks when 7 was in development to show FreeBSD 7's SMP performance and found that 7 was slightly faster than Linux on that workload and also found a pathological performance problem on Linux due to a bug in a bleeding edge version of glibc's memory allocator. These results were widely quoted. Months later, Nick Piggin reran the same benchmarks on a fixed version of glibc with the latest Linux kernel and found that the pathology was gone and that Linux was slightly faster than FreeBSD. Jeff said, "I feel confident that [Nick's] test was conducted fairly and I'm happy with these results. Our stable release is doing very well even if fresh-out-of-git linux is showing better on this platform." So, yes, FreeBSD has definitely caught up, and they're often neck and neck, but I don't think there is evidence of a sustained lead to call it "generally higher."

Also, as an aside, Linux's software RAID is quite good too (at least on par with FreeBSD's).

Re: Unix noob adventures

Posted: Fri Apr 17, 2009 6:41 pm
by bitvector
just brew it! wrote:
The line between the two is becoming increasingly blurry though -- Debian is now capable of running on top of the FreeBSD kernel. My head hurts. Interesting times we live in here... :D

Psh, "now" for really old values of now. I was using (well, playing around with) Debian/kFreeBSD in 2005 when (and before) the Ging Debian GNU/kFreeBSD LiveCD came out. This announcement just means they are more official as the main mirrors are carrying them. There's also Debian ports with the NetBSD and Hurd kernels if you're interested in such oddities (because none of them are terribly useful yet, being very rough around the edges). Gentoo also had a FreeBSD kernel-based Gentoo system (and the other BSDs, too), although that seems kind of silly since you might as well just use FreeBSD at that point.

Re: Unix noob adventures

Posted: Mon Apr 20, 2009 10:08 pm
by flip-mode
Is Hurd /ever/ going to happen? Is there any reason for it to with the Linux kernel doing the job just fine and being so incredibly mature at this point?

Crazy how stuff gets easier.

Posted: Mon Apr 20, 2009 10:10 pm
by flip-mode
I just installed swat, and configured it in about 30 minutes, while watching TV. It took me /days/ of frustration to get it going the first time I tried it. Sheesh.

Re: Crazy how stuff gets easier.

Posted: Mon Apr 20, 2009 10:56 pm
by just brew it!
flip-mode wrote:
I just installed swat, and configured it in about 30 minutes, while watching TV. It took me /days/ of frustration to get it going the first time I tried it. Sheesh.

Probably a combination of Linux maturing as a platform, and you getting more into the "Linux mindeset"... things really do get a lot easier as time goes by.

Re: Crazy how stuff gets easier.

Posted: Tue Apr 21, 2009 2:47 pm
by titan
just brew it! wrote:
flip-mode wrote:
I just installed swat, and configured it in about 30 minutes, while watching TV. It took me /days/ of frustration to get it going the first time I tried it. Sheesh.

Probably a combination of Linux maturing as a platform, and you getting more into the "Linux mindeset"... things really do get a lot easier as time goes by.

I'll say. My printer is now shared. Heck, my printer is just working in Linux. Don't know what the problem was before. And again, took only a few minutes to share it.

The one thing I'm trying to figure out though, is how the drivers work for that printer now. I just let Windows install the drivers that it found from somewhere, and it works just fine, but isn't there a way that I can get official drivers pushed to the clients from Samba? I've been researching this, and it doesn't seem to be the case or something.

Re: Crazy how stuff gets easier.

Posted: Tue Apr 21, 2009 4:27 pm
by just brew it!
titan wrote:
The one thing I'm trying to figure out though, is how the drivers work for that printer now. I just let Windows install the drivers that it found from somewhere, and it works just fine, but isn't there a way that I can get official drivers pushed to the clients from Samba? I've been researching this, and it doesn't seem to be the case or something.

Yeah, there's a way to have Samba push the drivers out. Not sure exactly how to do it though, and based on the research I did on this a few weeks ago, it looks like it is a PITA to set up.

Re: Crazy how stuff gets easier.

Posted: Tue Apr 21, 2009 5:10 pm
by bitvector
titan wrote:
I'll say. My printer is now shared. Heck, my printer is just working in Linux. Don't know what the problem was before. And again, took only a few minutes to share it.

Speaking of printing in Linux, I was impressed by CUPS doing automatic discovery of other CUPS instances using SNMP. I'd never really fiddled with printing much; I had been running CUPS for a long time on my gateway which is directly connected to a USB printer, but I'd been printing to it via lpd on end client machines. When I actually set up CUPS on a client, I was amazed when I went to the configuration and it had already detected the remote printer on the gateway without any intervention.

Re: Unix noob adventures

Posted: Wed Apr 22, 2009 9:54 pm
by Forge
CUPS, SWAT, Linux in general. Welcome to 2009. It's better than Linux in 2008 was, and tons better than Linux in 2000 was. It's crazy, I know.

:)

As for driver push via CUPS/SAMBA: Very very not worth doing. It takes a bit of fiddling to get right, most printer drivers react poorly to being pushed in this fashion, and it's generally a big PITA. I simply put the various printer drivers, like all my other drivers, on a plainly marked public read-only share. Works pretty well that way.

Re: Unix noob adventures

Posted: Thu Apr 23, 2009 6:42 am
by titan
Forge wrote:
CUPS, SWAT, Linux in general. Welcome to 2009. It's better than Linux in 2008 was, and tons better than Linux in 2000 was. It's crazy, I know.

:)

As for driver push via CUPS/SAMBA: Very very not worth doing. It takes a bit of fiddling to get right, most printer drivers react poorly to being pushed in this fashion, and it's generally a big PITA. I simply put the various printer drivers, like all my other drivers, on a plainly marked public read-only share. Works pretty well that way.

Yup, that's the way I would do it if I had more than these two clients. Disappointing, though, that it's so difficult to push the drivers. I'm sure the Samba developers will get that into SWAT some how so it'll be super easy.

Re: Unix noob adventures

Posted: Fri Apr 24, 2009 2:50 pm
by Forge
titan wrote:
Yup, that's the way I would do it if I had more than these two clients. Disappointing, though, that it's so difficult to push the drivers. I'm sure the Samba developers will get that into SWAT some how so it'll be super easy.

My admittedly limited understanding is that once again MS was internally inconsistent with how driver hosting/pushing was handled, and simply aping MS's methods results in non-functionality.