Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
wolrah
May 8, 2006
what?

covener posted:

Edit stupid answer out -- without knowing exactly what you want to still match this would screen out just the lines with the timstamp and no other 201: egrep "201[^3]"

Thank you, that was what I needed. For the record it was for an Asterisk log file, looking for logs relating to x201. Somehow though I have dozens of customers with extension 201 (or 200 until a few years back) this is the first time I've had this problem.

Adbot
ADBOT LOVES YOU

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.

wolrah posted:

Quick and stupid one, I'm trying to grep a log file for "201" but getting all lines matching due to "2013" in timestamps. Any way to not match 2013 while still allowing any other occurrence of 201 in the same line to match?

Somehow I get the feeling there's a regex in this answer, and that's about where my brain goes on vacation.

If you know what the next character is you can do:
code:
grep "201 " /var/log/messages
If not then it is regex time:
code:
grep -P "201[^3]"
grep -P "201[^23]"
The second variant also ignores 2012.

evol262
Nov 30, 2010
#!/usr/bin/perl

Illusive gently caress Man posted:

It's literally just busybox running on an ELDK minimal ramdisk with like SSH and poo poo added. If there's something I've put on there that would cause this, I have no idea what it would be.

Only you can answer this question. You could look for pmount. Or "find /lib/mdev -name "*mount". But I have no idea what your environment is like, and Linux doesn't automatically mount anything when it detects it, even if it's in fstab, unless you are using automount, udev/mdev rules, gnome-mount, or some other external script.

3spades
Mar 20, 2003

37! My girlfriend sucked 37 dicks!

Customer: In a row?
Posting because everyone has their own way to do it:
$ grep 201 test
201
2013
2013
201
$ grep 201 test | grep -v 2013
201
201

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

evol262 posted:

Only you can answer this question. You could look for pmount. Or "find /lib/mdev -name "*mount". But I have no idea what your environment is like, and Linux doesn't automatically mount anything when it detects it, even if it's in fstab, unless you are using automount, udev/mdev rules, gnome-mount, or some other external script.

Thanks, it was udev rules. There was a line in /etc/udev/rules.d/local.rules causing it. I'm still unfamiliar with a whole lot of stuff so sorry if this was a silly question.

peepsalot
Apr 24, 2007

PEEP THIS...
BITCH!

e: nevermind, too slow.

wolrah
May 8, 2006
what?

3spades posted:

Posting because everyone has their own way to do it:
$ grep 201 test
201
2013
2013
201
$ grep 201 test | grep -v 2013
201
201

That doesn't work in this case, because every single line has 2013 in it. grep -v 2013 would return nothing on any log files from this year.

code:
[2013-07-10 14:20:21] VERBOSE[5841] app_dial.c:     -- SIP/201-0001a300 is ringing
[2013-07-10 14:20:43] VERBOSE[3787] pbx.c:   == Spawn extension (ext-group, 955, 13) exited non-zero on 'SIP/Out-WLC-0001a2dd'
The egrep solution did the job, it matches on lines like the top that contain just 201, but not on 2013. There's a bit of chaff if there's a process ID, error code, or whatever that happens to contain 201 but it's very manageable. I'm pretty sure if I change the regex to 201[^0-9] that it'll eliminate most of that as well.

wolrah fucked around with this message at 19:27 on Jul 10, 2013

DreadCthulhu
Sep 17, 2008

What the fuck is up, Denny's?!
Are there any good guides / texts I can read to grok the OS better? I've been exclusively a Ubuntu user both at home, work and in production for the past year or so, but I still feel like I know nothing about the internals. Or for example when something breaks (like say I upgrade kernel and it won't boot due to some error message) I have no clue what to do and have to beg AskUbuntu and IRC for answers :) Is there anything I can do that will get me much better versed in this kind of stuff?

evol262
Nov 30, 2010
#!/usr/bin/perl

DreadCthulhu posted:

Are there any good guides / texts I can read to grok the OS better? I've been exclusively a Ubuntu user both at home, work and in production for the past year or so, but I still feel like I know nothing about the internals. Or for example when something breaks (like say I upgrade kernel and it won't boot due to some error message) I have no clue what to do and have to beg AskUbuntu and IRC for answers :) Is there anything I can do that will get me much better versed in this kind of stuff?

Break more stuff and figure it out, honestly, even if figuring it out means Google, IRC, or whatever. The best way to figure out "internals" is to do stuff with them. You're not going to grok it just from reading about it.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
If something sends a write request to a block device, and then a read of the same data before the write has completed, what data should the read return? Is this something that needs to be handled by the block device driver, or does the file system driver have its own buffer / know to not do this? I believe it's the latter, but I want to be sure because I'm planning on writing a device mapper target.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. Bertrand Russell

Is there a way to start a GUI application via the command line and nohup that doesn't take focus away from the terminal window? (Using Ubuntu if it matters)

Superdawg
Jan 28, 2009
I have been trying to get kdump working on a debian squeeze system running a 3.2 kernel from squeeze-backports for quite some time. Despite many hours of searching and reading, I have not been able to reach a solution that works.

Here's the scenario:

When I configure kdump /etc/default/kexec as I would like (I've varied the location of /var/crash around in the event that partitioning or location had anything to do with it, with no success):
code:
  USE_KDUMP=1
  KDUMP_COREDIR="/var/crash"
  DEBUG_KERNEL=/usr/lib/debug/boot/vmlinux-3.2.0-0.bpo.3-amd64
  KDUMP_CMDLINE_APPEND="irqpoll maxcpus=1"
And then update the grub config

code:
For grub1: Append crashkernel=64M@192M to kernel line on default boot
For grub2: edit /etc/default/grub and append "crashkernel=64M to GRUB_CMDLINE_LINUX_DEFAULT
run update-grub
 (If there is a double space before crashkernel in the resulting grub.cfg or menu.lst, I noticed that I have to remove it manually)
I then reboot the host and run kdumpconfig status, which returns "Ready to kdump":
code:
# kdump-config status
current state   : ready to kdump
This is the output of kdump-config show:
code:
# kdump-config show
USE_KDUMP:        1
KDUMP_SYSCTL:     kernel.panic_on_oops=1
KDUMP_COREDIR:    /var/crash
crashkernel addr: 0xc000000
current state:    ready to kdump

kernel link:
  /usr/lib/debug/boot/vmlinux-3.2.0-0.bpo.3-amd64

kexec command:
  /sbin/kexec -p --command-line="root=/dev/xvda1 rw console=hvc0   irqpoll maxcpus=1" --initrd=/boot/initrd.img-3.2.0-0.bpo.3-amd64 /boot/vmlinuz-3.2.0-0.bpo.3-amd64
Then I confirm that I have sysrq set up correctly by setting it to 1:
code:
echo 1 > /proc/sys/kernel/sysrq
(This is usually already set to 1, but I still do it for kicks)

Then I simulate a crash:
code:
echo c > /proc/sysrq-trigger
On a Squeeze host, the panic occurs, but nothing else. I have to manually reset the machine to bring it back.
On a RHEL6 host (slightly varied configuration), the kernel dumps the core as expected and reboots.

I have tried this on several machines, and they all react the same way. I've reached out to the package maintainer for kdump-tools, but I haven't gotten a reply.

I have two questions:
1. Does anyone here know what I might be doing wrong that I'm not seeing?
2. Does anyone here know of a specific mailing list I might be able to reach out to for help with this issue?

evol262
Nov 30, 2010
#!/usr/bin/perl

Illusive gently caress Man posted:

If something sends a write request to a block device, and then a read of the same data before the write has completed, what data should the read return? Is this something that needs to be handled by the block device driver, or does the file system driver have its own buffer / know to not do this? I believe it's the latter, but I want to be sure because I'm planning on writing a device mapper target.

It should return what you wrote. It's a unified buffer cache. Your pending write will end up in dirty or locked buffers if it's written directly to a block device, and in both page cache (and buffers, but from the filesystem) if it's on a filesystem. It's a non-issue. Exactly what are you doing with embedded?

Thermopyle posted:

Is there a way to start a GUI application via the command line and nohup that doesn't take focus away from the terminal window? (Using Ubuntu if it matters)

Gnome2:
gconftool-2 -s -t string /apps/metacity/general/focus_new_windows "strict"

Gnome3:
gconftool-2 --get /apps/metacity/general/no_focus_windows

Unity:
Who cares?

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

evol262 posted:

It should return what you wrote. It's a unified buffer cache. Your pending write will end up in dirty or locked buffers if it's written directly to a block device, and in both page cache (and buffers, but from the filesystem) if it's on a filesystem. It's a non-issue. Exactly what are you doing with embedded?

I can't really talk about the specifics because of an NDA and crap. It's a little silly because it's going to be open source in the end, but thems the rules. I'm writing a fancy device mapper target that does some work before writing stuff, and similar work after reading stuff.

In the dm-crypt source, which I'm modelling parts of my dm target after, when a write bio comes in, it gets sent to the crypto workqueue before anything touches the underlying block device. If a read bio comes in, it gets sent straight off to the underlying device without any check that a write is possibly still being encrypted. I guess I'm just asking if I've understood how this works correctly and if it's safe for me to do the same.

evol262
Nov 30, 2010
#!/usr/bin/perl

Illusive gently caress Man posted:

I can't really talk about the specifics because of an NDA and crap. It's a little silly because it's going to be open source in the end, but thems the rules. I'm writing a fancy device mapper target that does some work before writing stuff, and similar work after reading stuff.
Such is life. I'm extremely familiar with keeping code that will eventually be public under wraps

Illusive gently caress Man posted:

In the dm-crypt source, which I'm modelling parts of my dm target after, when a write bio comes in, it gets sent to the crypto workqueue before anything touches the underlying block device. If a read bio comes in, it gets sent straight off to the underlying device without any check that a write is possibly still being encrypted. I guess I'm just asking if I've understood how this works correctly and if it's safe for me to do the same.

At this point, you may be the most knowledgeable person in the thread about it, though I may be surprised. I guess my assumption would be that the crypto workqueue locks a potential write as soon as possible and has a corresponding dirty buffer, but that since there's always a filesystem on top of dm-crypt the read would hit the page cache for the filesystem anyway. I've never worked directly with raw dm-crypt block devices, though, and it may be a bad assumption. You probably want to ask in freenode/#device-mapper or dm-devel@redhat, honestly.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

evol262 posted:

Gnome3:
gconftool-2 --get /apps/metacity/general/no_focus_windows

GNOME 3 does not use gconf. This would be gsettings set org.gnome.desktop.wm.preferences focus-new-windows strict

evol262
Nov 30, 2010
#!/usr/bin/perl

Suspicious Dish posted:

GNOME 3 does not use gconf. This would be gsettings set org.gnome.desktop.wm.preferences focus-new-windows strict

I guess that's what I get for using deprecated tools.

Modern Pragmatist
Aug 20, 2008
I've got a networking issue. At work I'm trying to configure a new debian machine on the network to access a windows share. For some reason I can't see the share by either hostname or IP. I can, however, ping and connect to other computer on the same network.

What are some of the steps that I can perform to determine where the issue is?

IP I'm trying to connect to: 172.21.242.120

/sbin/ifconfig
pre:
eth0      Link encap:Ethernet  HWaddr b8:ca:3a:78:4d:79  
          inet addr:172.25.19.174  Bcast:172.25.19.255  Mask:255.255.254.0
          inet6 addr: fe80::baca:3aff:fe78:4d79/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1729 errors:0 dropped:0 overruns:0 frame:0
          TX packets:274 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:206441 (201.6 KiB)  TX bytes:39870 (38.9 KiB)
          Interrupt:20 Memory:fb300000-fb320000 

/sbin/route
pre:
default         172.25.18.1     0.0.0.0         UG    0      0        0 eth0
172.25.18.0     *               255.255.254.0   U     0      0        0 eth0
traceroute 172.21.242.120
pre:
 1  172.21.242.2 (172.21.242.2)  0.308 ms  0.302 ms  0.538 ms
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
...

Elias_Maluco
Aug 23, 2007
I need to sleep
I did an upgrade on my PC (Intel Core i5-4570, ASUS B85-Plus motherboard, more RAM). Ive reinstalled both Windows 7 and linux (Mint 15 KDE) and everything is working just fine.

There's just one thing: the PC is noticeably louder in linux than in windows. In windows, right after the login, the CPU cooler will drop to a very silent rotation, only getting louder in heavy load. In linux, it wont happen, the cooler always makes the same noise, no matter what Im doing.

I assume is the lack of MB drivers or something like that, but ASUS site dont have anything for any OS other than windows.

So what can I do? I spent most of my time in linux, and the noise bothers me.

Goon Matchmaker
Oct 23, 2003

I play too much EVE-Online

Elias_Maluco posted:

So what can I do? I spent most of my time in linux, and the noise bothers me.

You'll probably have to configure the fan control settings in the BIOS. Since there isn't an equivalent of the Asus Fan Control Service that I'm aware of available for Linux yet.

Edit: https://wiki.archlinux.org/index.php/Fan_Speed_Control Apparently there is fan control, looks painful to set up though.

telcoM
Mar 21, 2009
Fallen Rib

Modern Pragmatist posted:

I've got a networking issue. At work I'm trying to configure a new debian machine on the network to access a windows share. For some reason I can't see the share by either hostname or IP. I can, however, ping and connect to other computer on the same network.

What are some of the steps that I can perform to determine where the issue is?

IP I'm trying to connect to: 172.21.242.120

traceroute 172.21.242.120
pre:
 1  172.21.242.2 (172.21.242.2)  0.308 ms  0.302 ms  0.538 ms
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
...

Can you ping the Windows computer that contains the share?

Your traceroute got a response from (probably) the same network the target IP is in, so basic network connectivity seems to be OK.
The fact that your target server (172.21.242.120) does not respond to traceroute indicates that some sort of firewall is probably in effect, either as a separate physical device or as a software firewall in the Windows server.

What happens if you run "telnet 172.21.242.120 445"?

The command attempts to make a telnet connection to the new-style Windows disk/printer sharing port, which of course won't be very useful... but if it says "Connected to ...", then the firewall has been configured to allow only that port and not pings and traceroutes. If the telnet command hangs for up to a minute and then reports "Connection timed out", you can be pretty sure you're being blocked by a firewall.

(A server that just doesn't have the service you're requesting would answer by immediately rejecting the connection, which would cause a "Connection refused" error message without a significant delay. Firewalls usually just drop the connection request packet, causing the connection to hang and eventually time out.)

Elias_Maluco
Aug 23, 2007
I need to sleep

Goon Matchmaker posted:

You'll probably have to configure the fan control settings in the BIOS. Since there isn't an equivalent of the Asus Fan Control Service that I'm aware of available for Linux yet.

Edit: https://wiki.archlinux.org/index.php/Fan_Speed_Control Apparently there is fan control, looks painful to set up though.

It didnt looked so bad, but then I got stuck on "Increasing fan_div": I cant even find /etc/sensors.d/sensors.conf. Ive found a etc/sensors3.conf, but I cant find my chipset there. In fact, Im not even sure wtf should I be looking for anyway.

So it would have to be through the BIOS, but setting it there wont cause the fan rotation to be the same to matter the CPU use? If I to set it low to be silent, the CPU might overheat in heavy load.

Modern Pragmatist
Aug 20, 2008

telcoM posted:

Can you ping the Windows computer that contains the share?

I cannot ping the computer via hostname or IP.



Your traceroute got a response from (probably) the same network the target IP is in, so basic network connectivity seems to be OK.
The fact that your target server (172.21.242.120) does not respond to traceroute indicates that some sort of firewall is probably in effect, either as a separate physical device or as a software firewall in the Windows server.

telcoM posted:

What happens if you run "telnet 172.21.242.120 445"?

The result is:
pre:
Trying 172.21.242.120...
telnet: Unable to connect to remote host: Connection timed out

telcoM posted:

If the telnet command hangs for up to a minute and then reports "Connection timed out", you can be pretty sure you're being blocked by a firewall.

I'll have him turn off the firewall and see if that allows me to connect.

Are there any other things that I can test in the meantime? Same domain, netmask, etc?

evol262
Nov 30, 2010
#!/usr/bin/perl

Elias_Maluco posted:

So it would have to be through the BIOS, but setting it there wont cause the fan rotation to be the same to matter the CPU use? If I to set it low to be silent, the CPU might overheat in heavy load.

Motherboards are not this stupid. Thermal protection will still apply, and your CPU won't overheat.

Telemarchitect
Oct 1, 2009

TOUCH THE KNOB
Alright so after much fussing around I was able to install Ubuntu 13 on my laptop alongside Windows 7. I stuck Ubuntu (/) on sda5 and swap on sda6. Since windows is fussy and was installed first I'm still using its bootloader to select OSes. When I select Ubuntu I get kicked into a grub prompt. I can manually point it to the kernel and boot it, but I have to do this every time and its irritating. I tried doing grub update from terminal when Linux booted but that didn't fix anything. How do I get it to boot straight into Ubuntu from selecting it in the Windows bootloader? All the tutorials I've followed don't run into this problem.

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Telemarchitect posted:

How do I get it to boot straight into Ubuntu from selecting it in the Windows bootloader?

First of all, you're not going to be able to get rid of GRUB entirely. You need something to load Linux into memory, and GRUB knows how to do that, but the Windows bootloader does not.

Now, GRUB itself is also capable of loading Windows, and by default it assumes that it is the first and only bootloader, because it's more powerful. You presumably want to change this so that GRUB only knows about your Ubuntu install. On Debian, GRUB detects Windows partitions by using a tool in the "os-prober" package. So the first thing I would try is removing the "os-prober" package, and then running "update-grub" as root to rebuild the GRUB configuration. This should result in GRUB not finding any other operating systems, and building a configuration that only shows Ubuntu's options in its boot menu.

Edit: That said, the Windows bootloader is kind of screwy, and you might be a lot happier just making GRUB your first bootloader, which is what the default configuration assumes most people want.

evol262
Nov 30, 2010
#!/usr/bin/perl

Telemarchitect posted:

Alright so after much fussing around I was able to install Ubuntu 13 on my laptop alongside Windows 7. I stuck Ubuntu (/) on sda5 and swap on sda6.

I tried doing grub update from terminal when Linux booted but that didn't fix anything.

How do I get it to boot straight into Ubuntu from selecting it in the Windows bootloader?
Where is /boot?

Contrary to the previous post, you can boot Linux from ntldr or BCD, but it's finicky and you have no guarantees of it not breaking every time Windows Update runs.

What happens when you pick Ubuntu? GRUB or GRUB2 (I'm assuming the latter)?

At a guess, /boot/grub2/grub.cfg (which contains everything the grub menu shows) lists your root device and kernel wrong, but perhaps incorrect.

Write down what you type in GRUB to pick and compare to the kernel line in the grub configs. Ultimately, we need info on what actually happens

Telemarchitect
Oct 1, 2009

TOUCH THE KNOB

evol262 posted:

Where is /boot?

Contrary to the previous post, you can boot Linux from ntldr or BCD, but it's finicky and you have no guarantees of it not breaking every time Windows Update runs.

What happens when you pick Ubuntu? GRUB or GRUB2 (I'm assuming the latter)?

At a guess, /boot/grub2/grub.cfg (which contains everything the grub menu shows) lists your root device and kernel wrong, but perhaps incorrect.

Write down what you type in GRUB to pick and compare to the kernel line in the grub configs. Ultimately, we need info on what actually happens

Everything is on sda5 (/). Yeah I know partitioning is a really contentious thing in Linux but I don't need this to last me more than 4 months.

I get a GRUB 2 prompt upon choosing Ubuntu:

pre:
Initializing variable space
starting cmain

GRUB4DOS 0.4.5c 2012-06-19, Mem: 635K/2683M/0M, End: 354B21

[ 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>
after which I type and get

pre:
 
grub> root (hd0,4)
grub> kernel /boot/vmlinuz-3.8.0-19-generic root=/dev/sda5
  [Linux-bzImage, setup=0x4200, size=0x5175a0]
grub> initrd /boot/initrd.img-3.8.0-19-generic 
  [Linux-initrd @0x7f097000,0xf6756d7 bytes]
grub> boot 
then it boots to the Ubuntu login. It's Ubuntu 13.04 so it should be using GRUB2 but there's no boot/grub2/grub.cfg, only /boot/grub/grub.cfg. :confused: I open it and it says don't edit it, it's auto-generated.

I'm guessing it's trying to boot off hd0,0 which is my Windows partition.

Elias_Maluco
Aug 23, 2007
I need to sleep
So, I using linux on a PC with multiple HDs.

What is the easiest/best way to automount then so I dont have to do it manually every time?

Im using Mint 15 KDE.

Adult Sword Owner
Jun 19, 2011

u deserve diploma for sublime comedy expertise

Elias_Maluco posted:

So, I using linux on a PC with multiple HDs.

What is the easiest/best way to automount then so I dont have to do it manually every time?

Im using Mint 15 KDE.

Edit /etc/fstab

For specific "what do I change," there's a ton of tutorials on Google.

evol262
Nov 30, 2010
#!/usr/bin/perl

Elias_Maluco posted:

So, I using linux on a PC with multiple HDs.

What is the easiest/best way to automount then so I dont have to do it manually every time?

Im using Mint 15 KDE.

/etc/fstab

Telemarchitect posted:

Everything is on sda5 (/). Yeah I know partitioning is a really contentious thing in Linux but I don't need this to last me more than 4 months.
Why not?

Also, partitioning isn't really contentious these days, except that having a separate /boot is a good idea.

Telemarchitect posted:

pre:
Initializing variable space
starting cmain

GRUB4DOS 0.4.5c 2012-06-19, Mem: 635K/2683M/0M, End: 354B21

[ 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>
after which I type and get

pre:
 
grub> root (hd0,4)
grub> kernel /boot/vmlinuz-3.8.0-19-generic root=/dev/sda5
  [Linux-bzImage, setup=0x4200, size=0x5175a0]
grub> initrd /boot/initrd.img-3.8.0-19-generic 
  [Linux-initrd @0x7f097000,0xf6756d7 bytes]
grub> boot 
then it boots to the Ubuntu login. It's Ubuntu 13.04 so it should be using GRUB2 but there's no boot/grub2/grub.cfg, only /boot/grub/grub.cfg. :confused: I open it and it says don't edit it, it's auto-generated.

I'm guessing it's trying to boot off hd0,0 which is my Windows partition.

Everything above this is wrong.

Your problem is:

You have grub4dos. This has grub-legacy-like syntax, but it's not grub-legacy and it's not GRUB2. grub4dos is designed to co-exist with BCD/ntldr, or boot from a floppy, or USB stick, or any number of other edge cases, and it's not certain to me that you didn't leave a USB stick in or try to add Ubuntu to the Windows loader or some other situation which would confuse directions.

Please install GRUB2 instead:
code:
grub-mkconfig -o /boot/grub/grub.cfg 
grub-install --recheck /dev/sda

Elias_Maluco
Aug 23, 2007
I need to sleep

Dead Inside Darwin posted:

Edit /etc/fstab

For specific "what do I change," there's a ton of tutorials on Google.

Pretty easy, thank you.

Telemarchitect
Oct 1, 2009

TOUCH THE KNOB
I'd have to repartition/reinstall everything at this point to give it a dedicated /boot. I'm double booting because VMs are getting irritating for trying to do what I'm doing.

evol262 posted:

and it's not certain to me that you didn't try to add Ubuntu to the Windows loader

I think that's what I tried to do using EasyBCD, according to tutorials where you install Linux after Windows. This is the first time I've tried to double boot where the second OS wasn't also windows so it's no surprise I'm cocking everything up. :sigh:

quote:

Please install GRUB2 instead:
code:
grub-mkconfig -o /boot/grub/grub.cfg 
grub-install --recheck /dev/sda

Before I blindly type in commands and meddle with MBRs, this doesn't overwrite the existing windows bootloader does it?

Telemarchitect fucked around with this message at 16:04 on Jul 17, 2013

Sydney Bottocks
Oct 15, 2004

Telemarchitect posted:

I'd have to repartition/reinstall everything at this point to give it /boot. I'm double booting because VMs are getting irritating for trying to do what I'm doing.


I think that's what I tried to do using BCDEdit, according to tutorials where you install Linux after Windows. This is the first time I've tried to double boot where the second OS wasn't also windows so it's no surprise I'm cocking everything up. :sigh:


Before I blindly type in commands and meddle with MBRs, this doesn't overwrite the existing windows bootloader does it?

If you haven't checked it out yet, you might want to try EasyBCD from within Windows. I generally use it whenever I have a need to dual-boot Windows and Linux. The only caveat is that you have to make sure to tell the Linux install to point the Linux bootloader to the partition Linux is installed on, rather than the MBR (for example, in a typical Ubuntu install, you'd point it to /dev/sdaX--X being the partition that Ubuntu's installing to--rather than /dev/sda). Once the Linux install's finished, you then reboot back into Windows, fire up EasyBCD, and add your Linux entry to the BCD menu (if you're using Grub2 it should even be able to autodetect where the Grub2 partition is, so you shouldn't have to manually edit that).

E: You can also back up/restore your existing Windows BCD with this, which is also a handy feature when you're messing around with dual-booting. :)

Sydney Bottocks fucked around with this message at 16:05 on Jul 17, 2013

Telemarchitect
Oct 1, 2009

TOUCH THE KNOB

Sydney Bottocks posted:

If you haven't checked it out yet, you might want to try EasyBCD

Sorry, yeah, that's what I meant. I've tried it using auto and pointing it manually to sda5 without luck. I'll give it another shot.

evol262
Nov 30, 2010
#!/usr/bin/perl

Telemarchitect posted:

Before I blindly type in commands and meddle with MBRs, this doesn't overwrite the existing windows bootloader does it?
Yes and no. ntldr used boot.ini to keep a list. BCD keeps it in \Boot\BCD or EFI (if you have an EFI system, which I suspect you do not). Installing GRUB2 will remove bootmgr from the MBR and install grub. You can still chainload your default 7/Vista/2k12/whatever partition and get bootmgr to load and pick another version of Windows. grub-mkconfig will do this by default.

Flatly, GRUB is more capable, most OS-agnostic, and easier to configure. BCD doesn't have a single advantage over it, and if you remove Linux/want BCD back, it's trivial to do with a Windows install CD in recovery mode or to do from your actual Windows install before you blow away the Linux partitions.

You should be using GRUB, even if you use Windows 99% of the time.

Sydney Bottocks posted:

If you haven't checked it out yet, you might want to try EasyBCD from within Windows. I generally use it whenever I have a need to dual-boot Windows and Linux. The only caveat is that you have to make sure to tell the Linux install to point the Linux bootloader to the partition Linux is installed on, rather than the MBR (for example, in a typical Ubuntu install, you'd point it to /dev/sdaX--X being the partition that Ubuntu's installing to--rather than /dev/sda). Once the Linux install's finished, you then reboot back into Windows, fire up EasyBCD, and add your Linux entry to the BCD menu (if you're using Grub2 it should even be able to autodetect where the Grub2 partition is, so you shouldn't have to manually edit that).

E: You can also back up/restore your existing Windows BCD with this, which is also a handy feature when you're messing around with dual-booting. :)

Bootloader with a working command line and rescue shell that can load every operating system in existence, supports boot partitions on software RAID and volume-managed drives (including LVM and ZFS), can boot properly-formatted raw ISOs (including Ubuntu install/rescue CDs), plaintext config file that you can fix from any rescue CD using only a text editor and the "mount" command.

vs.

Comes with Windows. Can chainload Linux if you sacrifice a goat at midnight under a full moon. Uses an arcane registry-ish config that's so obfuscated people a tool called "EasyBCD" actually exists and is the preferred utility. Only possible error messages involve Ctrl+Alt+Del and tracking down a Windows CD to boot into recovery and bootrec.

Why would you ever pick the second one?

Telemarchitect
Oct 1, 2009

TOUCH THE KNOB

evol262 posted:

(if you have an EFI system, which I suspect you do not).

My laptop uses EFI. There's a 16MB partition for it.

...this explains all my problems doesn't it? :froggonk:

Sydney Bottocks
Oct 15, 2004

evol262 posted:

You should be using GRUB, even if you use Windows 99% of the time.

I'd normally agree with this, but wasn't there something about Windows (from Vista onwards) being fussy and not properly updating if its' bootloader isn't the "preferred" one on the MBR? I vaguely seem to remember reading something about that, but I could be mis-remembering it, too.

evol262
Nov 30, 2010
#!/usr/bin/perl

Telemarchitect posted:

My laptop uses EFI. There's a 16MB partition for it.

...this explains all my problems doesn't it? :froggonk:

No. Using BCD explains your problems. Following tutorials without knowing the first thing about bootloaders in general or GRUB in particular explains your problems.

Explain your setup.

Right now, my best guess is that you:

Used EasyBCD or something similar.
You're picking "Ubuntu" from the BCD menu (so EFI doesn't matter, because bootx64.efi has already been called, and is bootmgr)
It's calling grub4dos, which isn't finding a config file so it dumps you at a prompt

Install GRUB2.

Edit:

Sydney Bottocks posted:

I'd normally agree with this, but wasn't there something about Windows (from Vista onwards) being fussy and not properly updating if its' bootloader isn't the "preferred" one on the MBR? I vaguely seem to remember reading something about that, but I could be mis-remembering it, too.

Only with Service Packs, and it's not actually a problem with the MBR. It's a problem with the Windows partition not having the boot flag set (or in Windows terminology, having the partition marked as "active"), so the SP installer shits itself when it doesn't think it's going to be able to reboot into Phase 3 and finish the install. GRUB doesn't care what's marked as active. Install GRUB and boot flag the Windows partition, and you'll have no problems.

evol262 fucked around with this message at 17:05 on Jul 17, 2013

Adbot
ADBOT LOVES YOU

xtal
Jan 9, 2011

by Fluffdaddy

evol262 posted:

You should strace htop if it hangs on startup.

This is probably bad memory. Let memtest run overnight.

Kernel crashdump/kdump.

Back to this problem: memtest didn't show any errors, crashing is becoming more frequent. It used to only crash my browser or games every hour, now I can barely keep the browser open for 5 page loads, and things like pacman, mpd and etc. are constantly segfaulting. Removed catalyst and xf86-video-ati entirely and running Xorg :0 -configure from a TTY segfaults.

Does that still point to memory, or am I into CPU / motherboard territory?

xtal fucked around with this message at 20:53 on Jul 17, 2013

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply