Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Just built vanilla Arch kernel...
New Posts  All Forums:Forum Nav:

Just built vanilla Arch kernel... - Page 3

post #21 of 46
Quote:
Originally Posted by randomizer View Post
Interesting, I hadn't thought of that, largely because I know that the current kernel can be replaced with a newer version (the kernel image on disk, not the kernel in RAM, I don't know about that), and if it is being repeatedly read from the disk then I would assume that it would:

1) potentially cause problems if it is unpacked during an upgrade, and
2) upgrade the kernel in RAM; I'm fairly sure I need to reboot (or use some voodoo to replace a running kernel) to make a kernel upgrade take effect though.

Regarding kernel sizes, the type of compression used is going to affect that as well. Arch uses LZMA by default I think?
I'm afraid I don't quite understand unless you're talking about that dual (Linux and BSD on same distro) kernel project that Debian was working on. If that's the case I believe that was supposed to be either chosen exclusively at boot menu or virtualized in which case there is no collision. Also although a new kernel can certainly be copied into the "/boot" directory at anytime it is essentially persona non grata and incommunicado until "activated" by the bootloader.

Additionally afaik the kernel is never being written to and is only being read very much like the system BIOS is, so there is never any vulnerability.

Hope this clears something up for one or both of us lol.
NewMain
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 - 3550 Asrock Z77 Extreme4 Gigabyte GTX 760  4x2GB Corsair Vengeance 
Hard DriveOptical DriveCoolingOS
Seagate SATA 2TB x 2  Plextor PX-891SAW CM-Hyper N520 Slackware 14, Studio KUbuntu, OpenSuSe 12.3, Wi... 
MonitorKeyboardPowerCase
32" Vizio HDTV + DLP Logitech Wireless Corsair HX-850 Antec Sonata I 
MouseMouse PadAudioOther
Razer DeathAdder 2013 dual ESI Juli@ CoolGear ExtSata Enclosure w/ Optical and 3TB S... 
  hide details  
Reply
NewMain
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 - 3550 Asrock Z77 Extreme4 Gigabyte GTX 760  4x2GB Corsair Vengeance 
Hard DriveOptical DriveCoolingOS
Seagate SATA 2TB x 2  Plextor PX-891SAW CM-Hyper N520 Slackware 14, Studio KUbuntu, OpenSuSe 12.3, Wi... 
MonitorKeyboardPowerCase
32" Vizio HDTV + DLP Logitech Wireless Corsair HX-850 Antec Sonata I 
MouseMouse PadAudioOther
Razer DeathAdder 2013 dual ESI Juli@ CoolGear ExtSata Enclosure w/ Optical and 3TB S... 
  hide details  
Reply
post #22 of 46
Quote:
Originally Posted by enorbet2 View Post
I'm afraid I don't quite understand unless you're talking about that dual (Linux and BSD on same distro) kernel project that Debian was working on. If that's the case I believe that was supposed to be either chosen exclusively at boot menu or virtualized in which case there is no collision. Also although a new kernel can certainly be copied into the "/boot" directory at anytime it is essentially persona non grata and incommunicado until "activated" by the bootloader.

Additionally afaik the kernel is never being written to and is only being read very much like the system BIOS is, so there is never any vulnerability.

Hope this clears something up for one or both of us lol.
No the running kernel itself can be replaced, I was actually just going over that in the kernel config. I don't remember what it is, but it's basically a reboot without actually rebooting. Found it, kexec:

Code:
kexec is a system call that implements the ability to shutdown your
current kernel, and to start another kernel.  It is like a reboot
but it is independent of the system firmware.   And like a reboot
you can start any kernel with it, not just Linux.
This is probably what he is talking about.
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #23 of 46
Quote:
Originally Posted by nathris View Post
Did that. Also lightly followed this: https://wiki.archlinux.org/index.php...Kernel_Hacking
Nice link. It's about time somebody outlined that process. I learned all that from sitting beaucoup hours at xconfig which was helpful with it's tri-windowed mode where one can see the help entries for almost every config line in a 1,2, 3 breakdown. Leet guys called me names, lol, but it wasn't because I can't or don't also use menuconfig. It's just better organized visually and saves time when time is a BIG issue. I hope lot's of budding modders see that.


Quote:
Originally Posted by nathris View Post
I think you just configured your kernel wrong. I did that once and ran into issues.
While it is true that I am quite capable of mistakes. For example I recently forgot that the Fuse Option had to be enabled for NTFS-3G to work. That one was obvious in just a few hours but with Kernel Hacking functions enabled (and I've been doing that since the 2.4.8 kernel) any kernel problems are revealed.

Additionally I took an entirely vanilla kernel compiled for Slackware and a generic kernel from the Slackware install iso and tried both of them. Of course it booted, Hell, even Xandros would boot like that, but some functions ceased and it was not because of a badly configured kernel.

You may remember a post from a month or so ago by transhour who has been running a custom kernel on a Slackware server for quite some time and who initially was pleased to see that both Ubuntu and Arch would run on that vanilla kernel. Within a few days Ubuntu had problems, and iirc it took roughly 2 weeks for any to show in Arch, but show they did.


Quote:
Originally Posted by nathris View Post
My kernel is 1.6MB.
Nice. Do you use an initrd? My kernel would be smaller if I didn't have to load several things at kernel level to avoid having to use an initrd. I would begrudgingly accept an extra Meg! if I could avoid initrd. I hate 'em.
Edited by enorbet2 - 1/7/11 at 11:44pm
NewMain
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 - 3550 Asrock Z77 Extreme4 Gigabyte GTX 760  4x2GB Corsair Vengeance 
Hard DriveOptical DriveCoolingOS
Seagate SATA 2TB x 2  Plextor PX-891SAW CM-Hyper N520 Slackware 14, Studio KUbuntu, OpenSuSe 12.3, Wi... 
MonitorKeyboardPowerCase
32" Vizio HDTV + DLP Logitech Wireless Corsair HX-850 Antec Sonata I 
MouseMouse PadAudioOther
Razer DeathAdder 2013 dual ESI Juli@ CoolGear ExtSata Enclosure w/ Optical and 3TB S... 
  hide details  
Reply
NewMain
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 - 3550 Asrock Z77 Extreme4 Gigabyte GTX 760  4x2GB Corsair Vengeance 
Hard DriveOptical DriveCoolingOS
Seagate SATA 2TB x 2  Plextor PX-891SAW CM-Hyper N520 Slackware 14, Studio KUbuntu, OpenSuSe 12.3, Wi... 
MonitorKeyboardPowerCase
32" Vizio HDTV + DLP Logitech Wireless Corsair HX-850 Antec Sonata I 
MouseMouse PadAudioOther
Razer DeathAdder 2013 dual ESI Juli@ CoolGear ExtSata Enclosure w/ Optical and 3TB S... 
  hide details  
Reply
post #24 of 46
Quote:
Originally Posted by enorbet2 View Post
I'm afraid I don't quite understand unless you're talking about that dual (Linux and BSD on same distro) kernel project that Debian was working on.
Well if you take Arch for example, unless you compile a kernel manually I'm fairly sure it will overwrite the existing kernel each time it is updated. Perhaps there is more to it than that but that's what appears to happen. I'm pretty sure that Arch only ever has one vmlinuz at a time by default. I haven't been running Arch for a while so I'd have to double-check to be certain though.
    
CPUMotherboardGraphicsRAM
i7 920 D0 MSI X58 Pro-E GTX 560 Ti 448 3x2GB G.Skill DDR3-1333 9-9-9-24 
Hard DriveHard DriveOptical DriveOS
840 Pro Caviar Black LG BD-ROM Windows 8.1 Pro x64 
MonitorMonitorKeyboardPower
Dell U2713HM Dell U2311H Turbo-Trak (Google it :D) Corsair HX-520 
CaseMouseMouse PadAudio
CM690 Mionix Avior 7000 Everglide Titan AKG K 242 HD 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
i7 920 D0 MSI X58 Pro-E GTX 560 Ti 448 3x2GB G.Skill DDR3-1333 9-9-9-24 
Hard DriveHard DriveOptical DriveOS
840 Pro Caviar Black LG BD-ROM Windows 8.1 Pro x64 
MonitorMonitorKeyboardPower
Dell U2713HM Dell U2311H Turbo-Trak (Google it :D) Corsair HX-520 
CaseMouseMouse PadAudio
CM690 Mionix Avior 7000 Everglide Titan AKG K 242 HD 
  hide details  
Reply
post #25 of 46
Thread Starter 
Quote:
Originally Posted by randomizer View Post
Well if you take Arch for example, unless you compile a kernel manually I'm fairly sure it will overwrite the existing kernel each time it is updated. Perhaps there is more to it than that but that's what appears to happen. I'm pretty sure that Arch only ever has one vmlinuz at a time by default. I haven't been running Arch for a while so I'd have to double-check to be certain though.
When you update the Arch kernel it will replace which ever kernel has the same name in the /boot directory. If you rename the kernel and then do an update it won't remove the renamed version.

You can specify which kernel you're using in /boot/grub/menu.lst. I currently have two entries, one for the official 2.6.36 and one for my slim 2.3.37.
    
CPUMotherboardGraphicsRAM
Core i5 4670k ASUS Maximus VI Gene Gigabyte GTX 460 1GB Kingston Hyper-X 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 OCZ Vertex 3 WD6401AALS WD5000AAKS 
CoolingOSMonitorMonitor
Noctua NH-D14 elementary OS Dell Ultrasharp U2312HM LG W2442PA-BF 
KeyboardPowerCaseMouse
Microsoft Sidewinder X4 Corsair HX750W Corsair Graphite 600T Logitech G700 
Audio
ASUS Xonar DG 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Core i5 4670k ASUS Maximus VI Gene Gigabyte GTX 460 1GB Kingston Hyper-X 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 OCZ Vertex 3 WD6401AALS WD5000AAKS 
CoolingOSMonitorMonitor
Noctua NH-D14 elementary OS Dell Ultrasharp U2312HM LG W2442PA-BF 
KeyboardPowerCaseMouse
Microsoft Sidewinder X4 Corsair HX750W Corsair Graphite 600T Logitech G700 
Audio
ASUS Xonar DG 
  hide details  
Reply
post #26 of 46
Simply renaming the kernel isn't the smartest idea. You will probably end up with just a useless file, due to the updated modules.
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #27 of 46
It seems the difference between a stock Arch kernel and a sort-of stripped-down kernel as far as size is concerned isn't all that much. My stock 2.6.36 kernel is 2.2MB, while a kernel that I pre-configured with make localmodconfig (which enables only currently loaded modules) and then continued configuring with xconfig is 2.0MB.I'm sure there is more to remove from it but just running make localmodconfig strips out heaps on its own, often too much. Every time I use it I forget to enable USB Mass Storage and then wonder why my flash drives aren't working

At least it only takes 5 or so minutes to recompile if I screw something up.
    
CPUMotherboardGraphicsRAM
i7 920 D0 MSI X58 Pro-E GTX 560 Ti 448 3x2GB G.Skill DDR3-1333 9-9-9-24 
Hard DriveHard DriveOptical DriveOS
840 Pro Caviar Black LG BD-ROM Windows 8.1 Pro x64 
MonitorMonitorKeyboardPower
Dell U2713HM Dell U2311H Turbo-Trak (Google it :D) Corsair HX-520 
CaseMouseMouse PadAudio
CM690 Mionix Avior 7000 Everglide Titan AKG K 242 HD 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
i7 920 D0 MSI X58 Pro-E GTX 560 Ti 448 3x2GB G.Skill DDR3-1333 9-9-9-24 
Hard DriveHard DriveOptical DriveOS
840 Pro Caviar Black LG BD-ROM Windows 8.1 Pro x64 
MonitorMonitorKeyboardPower
Dell U2713HM Dell U2311H Turbo-Trak (Google it :D) Corsair HX-520 
CaseMouseMouse PadAudio
CM690 Mionix Avior 7000 Everglide Titan AKG K 242 HD 
  hide details  
Reply
post #28 of 46
Quote:
Originally Posted by randomizer View Post
It seems the difference between a stock Arch kernel and a sort-of stripped-down kernel as far as size is concerned isn't all that much. My stock 2.6.36 kernel is 2.2MB, while a kernel that I pre-configured with make localmodconfig (which enables only currently loaded modules) and then continued configuring with xconfig is 2.0MB.I'm sure there is more to remove from it but just running make localmodconfig strips out heaps on its own, often too much. Every time I use it I forget to enable USB Mass Storage and then wonder why my flash drives aren't working

At least it only takes 5 or so minutes to recompile if I screw something up.
Technically removing modules won't affect the kernel unless you remove built in ones. All you are doing with that is just not building them. I've never seen much proof for doing localmodconfig on a computer unless you want to save space. You might be shaving a few seconds off boot time while it figures out what modules you need to load, but you could also just force that too.

IMO Doing all this is pointless unless you are adding in actual performance tweaks like patches or hardware specific switches. I do all this for the BFQ/BFS patch set, maybe a few more but probably not. I might get a zen kernel going again but this 2.6.37 seems pretty good.
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #29 of 46
Quote:
Originally Posted by mushroomboy View Post
Technically removing modules won't affect the kernel unless you remove built in ones.
Oh yes, of course. I just checked /lib/modules/2.6.36-ARCH and it was 109MB vs 35.7MB for my custom kernel's modules directory. I did remove some extras that were normally compiled into the kernel itself, so that probably accounts for the 200kB difference in vmlinuz. The changes also cut memory usage down by 40MB and about 8 processes at startup. I almost accomplished something worthwhile

Quote:
Originally Posted by mushroomboy View Post
You might be shaving a few seconds off boot time while it figures out what modules you need to load, but you could also just force that too.
Well I did this primarily to see if it would actually make a noticeable difference. It didn't actually appear to do anything though. I need to put it on my SSD instead, because I know that will actually be noticeable. The problem is that will mean I'll have to relegate Windows 7 to a spinner and that would be frustratingly sluggish.
Edited by randomizer - 1/7/11 at 9:46pm
    
CPUMotherboardGraphicsRAM
i7 920 D0 MSI X58 Pro-E GTX 560 Ti 448 3x2GB G.Skill DDR3-1333 9-9-9-24 
Hard DriveHard DriveOptical DriveOS
840 Pro Caviar Black LG BD-ROM Windows 8.1 Pro x64 
MonitorMonitorKeyboardPower
Dell U2713HM Dell U2311H Turbo-Trak (Google it :D) Corsair HX-520 
CaseMouseMouse PadAudio
CM690 Mionix Avior 7000 Everglide Titan AKG K 242 HD 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
i7 920 D0 MSI X58 Pro-E GTX 560 Ti 448 3x2GB G.Skill DDR3-1333 9-9-9-24 
Hard DriveHard DriveOptical DriveOS
840 Pro Caviar Black LG BD-ROM Windows 8.1 Pro x64 
MonitorMonitorKeyboardPower
Dell U2713HM Dell U2311H Turbo-Trak (Google it :D) Corsair HX-520 
CaseMouseMouse PadAudio
CM690 Mionix Avior 7000 Everglide Titan AKG K 242 HD 
  hide details  
Reply
post #30 of 46
Quote:
Originally Posted by randomizer View Post
Oh yes, of course. I just checked /lib/modules/2.6.36-ARCH and it was 109MB vs 35.7MB for my custom kernel's modules directory. I did remove some extras that were normally compiled into the kernel itself, so that probably accounts for the 200kB difference in vmlinuz. The changes also cut memory usage down by 40MB and about 8 processes at startup. I almost accomplished something worthwhile


Well I did this primarily to see if it would actually make a noticeable difference. It didn't actually appear to do anything though. I need to put it on my SSD instead, because I know that will actually be noticeable. The problem is that will mean I'll have to relegate Windows 7 to a spinner and that would be frustratingly sluggish.
If the difference isn't noticeable on a platter system an SSD won't be noticeable either. Stripping a kernel used to be really popular, back when they weren't so modular. The thing is, now that we can unload that code there's no reason to go through the work. I see it as wasted time these days, but to each their own. =P
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Just built vanilla Arch kernel...