EmbeddedRelated.com
Forums

Linux boot drive issue

Started by Unknown April 19, 2014
On 2014-04-22, David Brown <david.brown@hesbynett.no> wrote:
> On 22/04/14 23:15, edward.ming.lee@gmail.com wrote: >> >> I am just saying that the default .config compile almost everything. > > No, the "default" .config does not compile almost everything - you have > a choice of defaults, and these are just a starting point. /Choose/ > what you want to build. /You/ are the one planning on writing your own > installer - /you/ choose what modules to include. > > It's like going to the supermarket. There is a lot of choice, but > you don't /have/ to buy one of every product in the shop!
That attitude is downright un-American! Next you'll be claiming you don't have to get a new smartphone every 6 months.
>>> Secondly, modules take no time at boot up >> >> They goes into initrdisk, as part of building the kernel. > > That's only true if you are building an initramfs,
Bah. That initramfs stuff is nonsense. If you build the kernel right in first place, you don't need an initial ramdisk or any of that fancy "module" stuff. ;) I'm only half joking -- none of my Linux machines have initial ramdisks, and the only ones with modules loaded are the ones using the closed-source nvidia drivers. But, I supose, if you want to build something that boots on any random PC, then yes, you will need an initial ramdisk and a _lot_ of modules that never get loaded for any particular machine. -- Grant Edwards grant.b.edwards Yow! I'm having a at quadrophonic sensation gmail.com of two winos alone in a steel mill!

> > Easy enough to check it. Just download it from kernel.org and see for yourself. > > I am just saying that the default .config compile almost everything.
> No, the "default" .config does not compile almost everything - you have > a choice of defaults, and these are just a starting point. /Choose/ > what you want to build. /You/ are the one planning on writing your own > installer - /you/ choose what modules to include.
Pointless to argue about this. Perhaps someone else can verify it. Download the kernel, "make menuconfig", exit without changing anyway. "make" and come back a few hours later to check it.
> That's only true if you are building an initramfs, and even then you > only include the modules you /need/ to have in the initramfs. Your > initramfs contains only those modules needed to get the main root > filesystem mounted (such as drivers for the filesystems, and perhaps > RAID, LVM, crypto, etc.), along with any user-space programs needed to > get your real root mounted.
There is no option to decide whether to place a module in initrd or rootfs. I want to build minimum initrd, but much more in rootfs.
> >> - they are only loaded and > >> used if they are needed. That's the main idea of making them modules > >> rather than statically linking them into the kernel.
> > This is only true for the main root file system.
> Yes, which is why you put your extra modules in your main filesystem. > You only put the pre-root essentials into your initramfs.
Until i figure out where to spit the process, it is the same single "make install" to build modules for both initrd and rootfs.
> >>> Perhaps there should be a "b" option that build the boot modules, > >>> in addition to the "m" option.
If we have this new option, we don't have to do it manually.
> No, a reasonable USB stick will do at least 10 MB/s, which is the same > as you get with 100 Mbit Ethernet (at peak). And even if you have the > world's worst USB stick, the speed difference would not explain a boot > time difference in the range of 100 between your claimed 20 minutes and > my few seconds
Again, we need independent verifications. I'll tried it on two different notebooks (no CD/DVD): Fujisu T2010 and HP mini 311.
On 23/04/14 00:03, Grant Edwards wrote:
> On 2014-04-22, David Brown <david.brown@hesbynett.no> wrote: >> On 22/04/14 23:15, edward.ming.lee@gmail.com wrote: >>> >>> I am just saying that the default .config compile almost everything. >> >> No, the "default" .config does not compile almost everything - you have >> a choice of defaults, and these are just a starting point. /Choose/ >> what you want to build. /You/ are the one planning on writing your own >> installer - /you/ choose what modules to include. >> >> It's like going to the supermarket. There is a lot of choice, but >> you don't /have/ to buy one of every product in the shop! > > That attitude is downright un-American! Next you'll be claiming you > don't have to get a new smartphone every 6 months.
Well I'm not American, and I don't know what planet edward.ming.lee lives on, so I guess that's okay!
> >>>> Secondly, modules take no time at boot up >>> >>> They goes into initrdisk, as part of building the kernel. >> >> That's only true if you are building an initramfs, > > Bah. That initramfs stuff is nonsense. If you build the kernel right > in first place, you don't need an initial ramdisk or any of that fancy > "module" stuff. ;) > > I'm only half joking -- none of my Linux machines have initial > ramdisks, and the only ones with modules loaded are the ones using the > closed-source nvidia drivers.
Initramfs is useful if you've got stuff like root on raid, crypto or lvm. But if you've just got a "normal" setup then you typically don't need it. And modules are handy to have around for hotplug devices - if you are compiling your own kernel, it makes sense to compile the stuff you normally need directly into the kernel rather than as a module. But having modules there is really handy when you want to plug in a new USB-to-Ethernet adaptor and find it just works out of the box.
> > But, I supose, if you want to build something that boots on any random > PC, then yes, you will need an initial ramdisk and a _lot_ of modules > that never get loaded for any particular machine. >
On Tue, 22 Apr 2014 23:48:50 +0200, David Brown wrote:

> It's like going to the supermarket. There is a lot of choice, but you > don't /have/ to buy one of every product in the shop! >
OH! This explains my high grocery bill and all the uneaten food I throw out every month! Thanks! -- Tim Wescott Wescott Design Services http://www.wescottdesign.com