[QUOTE=Sir Whoopsalot;29754812]Just out of curiosity, how do y'all pronounce Debian? I always pronounce dee-bee-yun but I hear people say deb-ee-yun or even deb-ee-ahn.[/QUOTE]
Deb-ee-yun.
[QUOTE=Surma;29753630]ls | less
What the [i]fuck[/i] did i just do???[/QUOTE]
[QUOTE=Surma;29753630]I know that you use less for that situation, but I couldn't remember exactly how to use it, so I experimented. Bad idea. ls | less is like reg query hklm /s, only ten times worse. Both widows and ubuntu are still booting fine though.[/QUOTE]
All "ls | less" does is list all the files in the current directory, one screenful at a time. That's pretty innocuous.
[QUOTE=Surma;29753630]I used something involving find to [i]copy[/i] both home and /usr to a different partition (I think I copied home with sudo and usr without) and set up mount points and bind so that /home and /usr are bound to the ones on my partition.[/QUOTE]
Does that mean the original /home and /usr directories are still there on the root partition, with all their contents? If so, you should be able to fix this by just unmounting the broken copies.
[QUOTE=Surma;29753630]I did and it worked, but somehow I broke sudo in the process.[/QUOTE]
[QUOTE=Surma;29753630]However, I assumed that this sudo that root needs to own is a folder. I just checked, and realised that it is a file. Interesting...[/QUOTE]
Yes, sudo is a file. It's a program. "Setuid" is an option that can be set on a program, that means it always runs with the authority of its owner, instead of the authority of the person who runs it. System programs, such as those in /usr/bin, are owned by root. A "setuid root" program always runs with root privileges, even when invoked by a normal user. That's essential for sudo because its whole purpose is to do things as root on your behalf.
What you should've done, back when you copied the files, is use the "-a" option of the "cp" command. That directs it to duplicate not just the files' contents, but also their ownership, permissions, timestamps, and other metadata. Without it, you've lost important metadata on many files in your copy.
Rather than trying to fix this by hand — you'd have to look up the correct owner and permissions for every file in the /usr tree — it'd be much simpler to just unmount the borked copy so that the original, on the root filesystem, becomes visible once again. In your GRUB menu, when booting, there should be a "recovery mode" option that you can choose. That'll give you a root shell, which you can use to edit /etc/fstab and remove the line that mounts your /usr partition.
[editline]11th May 2011[/editline]
[QUOTE=Sir Whoopsalot;29754812]Just out of curiosity, how do y'all pronounce Debian? I always pronounce dee-bee-yun but I hear people say deb-ee-yun or even deb-ee-ahn.[/QUOTE]
"Deb" as in "Debra", "Ian" as in... "Ian". The two people who it's named after.
[quote]All "ls | less" does is list all the files in the current directory, one screenful at a time. That's pretty innocuous.[/quote]
When I ran it it was like less was trying to find a way to comprehend what it was getting. Weird characters, tons of text and error messages flew by, it made noises (I think I read something like "outputting through speakers at 800 MHz or something). I couldn't kill it with ctrl+c.
[quote]Does that mean the original /home and /usr directories are still there on the root partition, with all their contents? If so, you should be able to fix this by just unmounting the broken copies.[/quote]
Yes, I just renamed them. But I still want /home and /usr to be on the separate partition.
[quote]Yes, sudo is a file. It's a program. "Setuid" is an option that can be set on a program, that means it always runs with the authority of its owner, instead of the authority of the person who runs it. System programs, such as those in /usr/bin, are owned by root. A "setuid root" program always runs with root privileges, even when invoked by a normal user. That's essential for sudo because its whole purpose is to do things as root on your behalf.
What you should've done, back when you copied the files, is use the "-a" option of the "cp" command. That directs it to duplicate not just the files' contents, but also their ownership, permissions, timestamps, and other metadata. Without it, you've lost important metadata on many files in your copy.
Rather than trying to fix this by hand — you'd have to look up the correct owner and permissions for every file in the /usr tree — it'd be much simpler to just unmount the borked copy so that the original, on the root filesystem, becomes visible once again. In your GRUB menu, when booting, there should be a "recovery mode" option that you can choose. That'll give you a root shell, which you can use to edit /etc/fstab and remove the line that mounts your /usr partition.[/QUOTE]
I used the following code to copy it:
[code]$cd /home/
$find . -depth -print0 | cpio --null --sparse -pvd /mnt/newhome/[/code]
Should this have preserved user permissions?
I've got a 750GB harddrive with 100GB free space (the rest being allocated to NTFS storage, no OS) which I want to partition to allow Arch on it. I want to keep my 650GB NTFS sector and its data intact, and I'm using cfdisk to configure the partitions - I just want to make sure that once I've added my four Arch partitions to the 100GB free space that when I hit write, it won't do anything to my NTFS partition which was already there?
Either I could install wireless drivers... or I could use Ubuntu.
I can't find any easy to way to setup my Broadcom 4313 on Crunchbang.
I'm not going Ubuntu just yet but if I can't find a way, I'll swap to Ubuntu.
I fucking hate graphics drivers on Linux, they never seem to work first time around. I can't even get the Nouveau drivers to work on Arch :( When using startx i get "Module nouveau not found" - what am I doing wrong? My card's a GTX 260
[QUOTE=AMD 32;29763103]I fucking hate graphics drivers on Linux, they never seem to work first time around. I can't even get the Nouveau drivers to work on Arch :( When using startx i get "Module nouveau not found" - what am I doing wrong? My card's a GTX 260[/QUOTE]
As far as I recall nouveau doesn't work properly with cards past the 9000 series, try nvidia.
Shall I do that via pacman -S nvidia?
pacman -S xf86-video-nvidia
I think
i always just did pacman -S nvidia when i had my 9800
You'll want the binary drivers from nvidia, nouveau isn't quite ready yet.
(pacman -S nvidia)
[QUOTE=Surma;29756345]When I ran it it was like less was trying to find a way to comprehend what it was getting. Weird characters, tons of text and error messages flew by, it made noises (I think I read something like "outputting through speakers at 800 MHz or something). I couldn't kill it with ctrl+c.[/QUOTE]
Less doesn't "comprehend" anything; it just divides its input up into lines by looking for newline characters, displays twenty-four of them (or however many will fit in your terminal window), waits for you to press a key, then displays some more. If you try to display a non-text file, you'll see lots of nonsense, but that's because it's what non-text data looks like when displayed in a terminal. Getting that sort of output from "ls" doesn't make any sense.
[QUOTE=Surma;29756345]I used the following code to copy it:
[code]$cd /home/
$find . -depth -print0 | cpio --null --sparse -pvd /mnt/newhome/[/code]
Should this have preserved user permissions?[/QUOTE]
Yes, though that's an unusual way to copy a tree of files. But you mentioned earlier that you copied /usr without using sudo, which means all the files in the copy were created with you as the owner, rather than with the correct owner (mostly root, but other system accounts for some files). So even if the copied sudo program had its setuid option turned on, it'd run as you, not as root, because you're the owner of the file.
Try this instead:
[code]cp -a /home/. /mnt/newhome/[/code]
[QUOTE=Wyzard;29768004]Less doesn't "comprehend" anything; it just divides its input up into lines by looking for newline characters, displays twenty-four of them (or however many will fit in your terminal window), waits for you to press a key, then displays some more. If you try to display a non-text file, you'll see lots of nonsense, but that's because it's what non-text data looks like when displayed in a terminal. Getting that sort of output from "ls" doesn't make any sense.[/quote]
It behaved the same way when I tried man (anything). Did I mention this was in recovery console? Some text flew by, then line after line of this weird square character. Maybe I should snap a picture.
[quote]Yes, though that's an unusual way to copy a tree of files. But you mentioned earlier that you copied /usr without using sudo, which means all the files in the copy were created with you as the owner, rather than with the correct owner (mostly root, but other system accounts for some files). So even if the copied sudo program had its setuid option turned on, it'd run as you, not as root, because you're the owner of the file.
Try this instead:
[code]cp -a /home/. /mnt/newhome/[/code][/QUOTE]
When I tried to copy /usr (it says home in the code because that code came from a guide on moving home and I used the same principles to move /usr) earlier yesterday from the recovery console I ran into a small problem. I used mkdir to to create a dir named /usr_old in the partition (expressed in a windows-style, G:\usr_old) copied the contents of the unbroken usr (renamed /usr_old) into the new with -a and I got that the newly created dir is not a directory. With ls the dir had a green box behind it.
[editline]12th May 2011[/editline]
Odd, tried again and now it worked, must've misspelled something earlier. The unbroken usr has now ben copied to the right place, from recovery console using cp -a. The broken one has been renamed usr_broken and the newly copied one has been renamed usr. I dumped an empty file in /usr and navigated to it through /mnt/data/usr, it was there, confirming that it is indeed the /usr in the partition that is bound to /usr. Ls -l confirmed that sudo has the right permissions (-rwxrwxrwx 2 root root 168800). Everything seems to be in order.
Booted into normal ubuntu, everything looks fine, tries sudo.
sudo: must be setuid root
I really don't. Okay, the data partition is ntfs, could that matter? Could it be something connected to the fact that it is mounted, and this in some way forces user setuid on everything coming from the partition? Ls /usr returns the dirs with a green box behind them, bud ls /usr_old (my backup) does not (usr_old is located on my system partition).
[editline]12th May 2011[/editline]
I'll post my fstab.
[code]proc /proc proc nodev,noexec,nosuid 0 0
UUID=5af35cb2-bdf2-4ad2-afbe-1b3c4c10c42e / ext4 errors=remount-ro 0 1
UUID=aa16b3f4-53c8-4bd8-8bf1-a147e1f360d3 none swap sw 0 0
/dev/sda7 /mnt/data ntfs defaults 0 2
/mnt/data/usr /usr bind defaults,bind 0 2
/mnt/data/home /home bind defaults,bind 0 2
[/code]
[editline]12th May 2011[/editline]
Everything from /dev/sda7 and below is stuff I've added.
[QUOTE=Surma;29773802]Ls -l confirmed that sudo has the right permissions (-rwxrwxrwx 2 root root 168800).[/QUOTE]
That's not the right permissions. It should be "-rwsr-xr-x". The "s" in the fourth column is the setuid flag.
[QUOTE=Surma;29773802]Okay, the data partition is ntfs, could that matter?[/QUOTE]
Yes, that makes a huge difference. NTFS is not a Unix filesystem and does not support Unix-style file permissions. The permissions you see on the files are generic defaults simulated by the driver; that's why your copy of sudo has no setuid flag. You can't use NTFS for the /usr partition on a GNU/Linux system.
Anyway, what's with the /usr_old and /usr_broken? You don't need to make another copy of the working /usr that's on the root filesystem, because you're not changing that one, you're just mounting something else over it. And the broken one is useless; just delete it.
[QUOTE=Wyzard;29776498]That's not the right permissions. It should be "-rwsr-xr-x". The "s" in the fourth column is the setuid flag.
Yes, that makes a huge difference. NTFS is not a Unix filesystem and does not support Unix-style file permissions. The permissions you see on the files are generic defaults simulated by the driver; that's why your copy of sudo has no setuid flag. You can't use NTFS for the /usr partition on a GNU/Linux system.
Anyway, what's with the /usr_old and /usr_broken? You don't need to make another copy of the working /usr that's on the root filesystem, because you're not changing that one, you're just mounting something else over it. And the broken one is useless; just delete it.[/QUOTE]
Ohhhhhhhh! That explains it!
[editline]12th May 2011[/editline]
I renamed the original /usr when I first setup the mounting as I didn't know if I could mount "over" the existing. Can I do that then?
So I've got a bit of a problem... I'm using XFCE on Ubuntu with a really bad system... and almost all of the text in programs that aren't browsers gets printed like this:
[img]http://i.imgur.com/RAn82.png[/img]
How do I fix this. I'm on a 32" TV and this is obnoxious...
Increase font size?
Someone, including google or XFCE docs can probably brief you further on this matter.
Aha! I was adjusting the wrong font size. Appearance menu, change font, font size.
[QUOTE=Surma;29778073]I renamed the original /usr when I first setup the mounting as I didn't know if I could mount "over" the existing. Can I do that then?[/QUOTE]
Yes, in fact you have to. A mount always goes on an existing directory. Typically an empty directory is used, since the mount "hides" the contents of the underlying directory, but it's perfectly OK to mount something on a directory that has files on it, as long as you don't need to access those files.
In your case, after you copy the contents of /usr to another partition, you can just mount that partition on top of the existing /usr. After you've verified that it works correctly, then you can delete the contents of the original /usr, and leave just the empty directory for use as the mountpoint.
Well I dug out my old computer and since I wouldn't be able to do much with it anyway I think I'm gonna put linux on it, probably mint.
[QUOTE=Wyzard;29787010]Yes, in fact you have to. A mount always goes on an existing directory. Typically an empty directory is used, since the mount "hides" the contents of the underlying directory, but it's perfectly OK to mount something on a directory that has files on it, as long as you don't need to access those files.
In your case, after you copy the contents of /usr to another partition, you can just mount that partition on top of the existing /usr. After you've verified that it works correctly, then you can delete the contents of the original /usr, and leave just the empty directory for use as the mountpoint.[/QUOTE]
Well, after some consideration I have decided that it is simply too much hazzle to move usr. I don't want another partition, so I'll just restore everything to the way it was. I've done that and now sudo functions as intended. I spoke to someone else who is good with ubuntu and he assured me that there is no point in moving usr. I was originally concerned that I would not have enough space on the system partition, but he said that I have quite enough space. So yeah, sorry for wasting your time.
[editline]13th May 2011[/editline]
Uh, it seems like my tampering has broken something after all...
Remember that I said something about getting weird results from ls | less? Well, I checked if that problem persists and it does. I tried running ls | less > error (dumping the output in a file). First of, this gets printed on the screen:
[code]arvid@hal9000:/$ ls | less > /home/arvid/Desktop/error
/usr/bin/less: line 1: [: missing `]'
At least one file or directory argument required.
Use --help to show usage.
At least one file or directory argument required.
Use --help to show usage.
At least one file or directory argument required.
Use --help to show usage.
Home directory /home/arvid not ours.[/code]
To add weird to odd, this is what got dumped into error:
[code]#!/usr/bin/perl
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if $running_under_some_shell;
# this emulates #! processing on NIH machines.
# (remove #! line above if indigestible)
eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_0-9]+=)(.*)/ && shift;
# process any FOO=bar switches
$[ = 1; # set array base to 1
while (<>) {
@Fld = split(' ', $_, -1);
print $_ if $bin;
print $_ if $boot;
print $_ if $cdrom;
print $_ if $dev;
print $_ if $etc;
print $_ if $home;
print $_ if $initrd . . $img;
print $_ if $initrd . . $img . . $old;
print $_ if $lib;
print $_ if $lib32;
print $_ if $lib64;
print $_ if $lost + $found;
print $_ if $media;
print $_ if $mnt;
print $_ if $opt;
print $_ if $proc;
print $_ if $Fld[$RECYCLE] . . $BIN;
print $_ if $root;
print $_ if $sbin;
print $_ if $selinux;
print $_ if $srv;
print $_ if $sys;
print $_ if $tmp;
print $_ if $usr;
print $_ if $var;
print $_ if $vmlinuz;
print $_ if $vmlinuz . . $old;
}
aconnect - ALSA sequencer connection manager
Copyright (C) 1999-2000 Takashi Iwai
Usage:
* Connection/disconnection between two ports
aconnect [-options] sender receiver
sender, receiver = client:port pair
-d,--disconnect disconnect
-e,--exclusive exclusive connection
-r,--real # convert real-time-stamp on queue
-t,--tick # convert tick-time-stamp on queue
* List connected ports (no subscription action)
aconnect -i|-o [-options]
-i,--input list input (readable) ports
-o,--output list output (writable) ports
-l,--list list current connections of each port
* Remove all exported connections
-x, --removeall[/code]
Something similar occurs when i run man.
Wait Why are you redirecting ls | less to a file.
Less takes input from either file or a pipe and allows you to navigate through it with the up and down arrows. (it also allows searching and some other stuff) I don't see why you want to redirect it to file. If you want the output of ls to be put to file then do ls > file.
[QUOTE=Boris-B;29800171]Wait Why are you redirecting ls | less to a file.
Less takes input from either file or a pipe and allows you to navigate through it with the up and down arrows. (it also allows searching and some other stuff) I don't see why you want to redirect it to file. If you want the output of ls to be put to file then do ls > file.[/QUOTE]
What I was trying to do is show what happened when I ran ls | less, a second later I realised that I can copy-paste from the console.
[editline]13th May 2011[/editline]
Point being, ls | less does not behave the way it should.
The "line 1: [: missing `]'" message looks like it comes from a shell script containing a syntax error in a conditional expression, which is strange since neither "ls" nor "less" are shell scripts. The "At least one file or directory argument required" messages seem to be from some program that was run with an incomplete set of command-line arguments.
The Perl script seems to be the output of a tool called "a2p" that converts Awk scripts into Perl scripts, which is also strange since neither "ls" nor "less" is an Awk script either. The last part of what you pasted is the help message you get if you run "aconnect" without any command-line arguments.
Do you get these results running "ls" by itself? How about if you pipe something else into "less" instead?
If you run "file /usr/bin/less", what does it say?
Do "which ls" and "which less" and it will tell you what file is being executed when you run those commands.
I see that most people here like to use Arch, I'm currently using Ubuntu on my laptop but I've heard Arch is generally better as you get to configure everything you want without all the bloated extra shit, let me know if I'm completely wrong. I would just like to know how easy things are(like if they have tutorials for drivers ect)?
If you can [url=http://wiki.archlinux.org/]read a wiki[/url], you can install and configure Arch.
when installing arch, are there any packages that i can select that will give me broadcom drivers?
broadcom, IIRC
[editline]15th May 2011[/editline]
Not on the installation image, though, I'm pretty sure. I had to use a physical cable till I got my WLAN working.
I didn't need any drivers for my WLAN, pretty lucky considering I couldn't find a LAN cable in my house.
Sorry, you need to Log In to post a reply to this thread.