EmbeddedRelated.com
Forums

Linux boot drive issue

Started by Unknown April 19, 2014
I am trying to make a bootable USB disk to install on a laptop.  In the old days, it was simple and can probably do it with less than 1G flash drive.  I could build on sda1 and install on hda1 (PATA). 

But, in the name of progress, things are more difficult.  It would take around 5G of flash.  Booting 5M kernel and 30M ram disk takes several minutes.  Building the kernel takes hours.  But the biggest problem is SATA.

With a poorly made decision, IMHO, they named the SATA "sd" as well. So, now i have to make sdb1 and install on sda1, if i am lucky.  With both SATA and USB MSD fighting for the first "sd" name, results are unpredictable.  I get either sda1 UMSD and sdb1 SATA, or sdb1 UMSD and sda1 SATA.

I am very tempted to, rip out the kernel and rename:

1. "hd" for SATA and "sd" for UMSD
2. "sd" for SATA and "ud" for UMSD
3. "hd" for SATA and "ud" for UMSD

What do you guys think?b
On Sat, 19 Apr 2014 07:55:06 -0700, edward.ming.lee wrote:

> I am trying to make a bootable USB disk to install on a laptop. In the > old days, it was simple and can probably do it with less than 1G flash > drive. I could build on sda1 and install on hda1 (PATA). > > But, in the name of progress, things are more difficult. It would take > around 5G of flash. Booting 5M kernel and 30M ram disk takes several > minutes. Building the kernel takes hours. But the biggest problem is > SATA. > > With a poorly made decision, IMHO, they named the SATA "sd" as well. So, > now i have to make sdb1 and install on sda1, if i am lucky. With both > SATA and USB MSD fighting for the first "sd" name, results are > unpredictable. I get either sda1 UMSD and sdb1 SATA, or sdb1 UMSD and > sda1 SATA. > > I am very tempted to, rip out the kernel and rename: > > 1. "hd" for SATA and "sd" for UMSD 2. "sd" for SATA and "ud" for UMSD 3. > "hd" for SATA and "ud" for UMSD > > What do you guys think?b
And yet Ubuntu manages to do it on a 700MB CD, still, or a 1GB USB stick. Perhaps see if you can see what Cannonical does to make it work, then shamelessly copy that? -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On 19/04/14 15:55, edward.ming.lee@gmail.com wrote:
> I am trying to make a bootable USB disk to install on a laptop. In the old days, it was simple and can probably do it with less than 1G flash drive.
Damn Small Linux manages in 50MB, including applications and networking and printing etc http://www.damnsmalllinux.org/
<edward.ming.lee@gmail.com> wrote:

> What do you guys think?b
that the right way to name the disks is to use the labels, not the sd* thing. Bye Jack -- Yoda of Borg am I! Assimilated shall you be! Futile resistance is, hmm?
On Saturday, April 19, 2014 3:43:47 PM UTC-7, Tim Wescott wrote:
> On Sat, 19 Apr 2014 07:55:06 -0700, edward.ming.lee wrote: > > > I am trying to make a bootable USB disk to install on a laptop. In the > > old days, it was simple and can probably do it with less than 1G flash > > drive. I could build on sda1 and install on hda1 (PATA). > > But, in the name of progress, things are more difficult. It would take > > around 5G of flash. Booting 5M kernel and 30M ram disk takes several > > minutes. Building the kernel takes hours. But the biggest problem is > > SATA. > > > With a poorly made decision, IMHO, they named the SATA "sd" as well. So, > > now i have to make sdb1 and install on sda1, if i am lucky. With both > > SATA and USB MSD fighting for the first "sd" name, results are > > unpredictable. I get either sda1 UMSD and sdb1 SATA, or sdb1 UMSD and > > sda1 SATA. > > > I am very tempted to, rip out the kernel and rename: > > 1. "hd" for SATA and "sd" for UMSD 2. "sd" for SATA and "ud" for UMSD 3. > > "hd" for SATA and "ud" for UMSD > > > > What do you guys think?b > > And yet Ubuntu manages to do it on a 700MB CD, still, or a 1GB USB stick.
LinuxMint/Ubuntu kernel is slightly older (3.8) and not very useful by itself after installation. After pulling in all the necessary packages, the working set is around 5G. I have 8G SD to store all the files, so no need to do all the apt-get for every machine. Latest kernel (3.13) is several times bigger, with lots of junks included.
> Perhaps see if you can see what Cannonical does to make it work, then > shamelessly copy that?
I need to patch something in the kernel, so need to compile rather than copy.
On Saturday, April 19, 2014 4:17:35 PM UTC-7, Tom Gardner wrote:
> On 19/04/14 15:55, edward.ming.lee@gmail.com wrote: > > > I am trying to make a bootable USB disk to install on a laptop. In the old days, it was simple and can probably do it with less than 1G flash drive. > > > Damn Small Linux manages in 50MB, including applications and networking and printing etc
I am pretty sure it's older kernel (2.4 or 2.6) without Wireless support.
On Saturday, April 19, 2014 4:46:21 PM UTC-7, Jack wrote:
> <edward.ming.lee@gmail.com> wrote: > > > What do you guys think?b > > that the right way to name the disks is to use the labels, not the sd* > thing.
The label thing is hard to automate, without patching every installation USB/SD card. Why give up the simple abstraction for long label IDs? hd/sd works fine for a long time until they decided to change to sd/sd. Any other of the 26 alphabet would have been better.
On Sat, 19 Apr 2014 07:55:06 -0700, edward.ming.lee wrote:

> I am trying to make a bootable USB disk to install on a laptop. In the > old days, it was simple and can probably do it with less than 1G flash > drive. I could build on sda1 and install on hda1 (PATA). > > But, in the name of progress, things are more difficult. It would take > around 5G of flash. Booting 5M kernel and 30M ram disk takes several > minutes. Building the kernel takes hours. But the biggest problem is > SATA. > > With a poorly made decision, IMHO, they named the SATA "sd" as well. So, > now i have to make sdb1 and install on sda1, if i am lucky. With both > SATA and USB MSD fighting for the first "sd" name, results are > unpredictable. I get either sda1 UMSD and sdb1 SATA, or sdb1 UMSD and > sda1 SATA. > > I am very tempted to, rip out the kernel and rename: > > 1. "hd" for SATA and "sd" for UMSD > 2. "sd" for SATA and "ud" for UMSD > 3. "hd" for SATA and "ud" for UMSD > > What do you guys think?b
Take a look at puppy linux http://puppylinux.org/main/Download%20Latest%20Release.htm Not sure if it will do everything you want but they claim a 161MB ISO boot image. One of their big selling points is carry anywhere boot from USB. -- Chisolm Republic of Texas
On 19/04/14 16:55, edward.ming.lee@gmail.com wrote:
> I am trying to make a bootable USB disk to install on a laptop. In > the old days, it was simple and can probably do it with less than 1G > flash drive. I could build on sda1 and install on hda1 (PATA). > > But, in the name of progress, things are more difficult. It would > take around 5G of flash. Booting 5M kernel and 30M ram disk takes > several minutes. Building the kernel takes hours. But the biggest > problem is SATA. > > With a poorly made decision, IMHO, they named the SATA "sd" as well. > So, now i have to make sdb1 and install on sda1, if i am lucky. With > both SATA and USB MSD fighting for the first "sd" name, results are > unpredictable. I get either sda1 UMSD and sdb1 SATA, or sdb1 UMSD > and sda1 SATA. > > I am very tempted to, rip out the kernel and rename: > > 1. "hd" for SATA and "sd" for UMSD 2. "sd" for SATA and "ud" for > UMSD 3. "hd" for SATA and "ud" for UMSD > > What do you guys think?b >
There is good reason why these are all labelled "sd" these days - they are all part of the same subsystem and are thus treated the same, with all the advantages that stem from that. But in all the many systems I have installed, I have never seen an issue with confusion about names while installing. Hard disks on SATA get enumerated first - installation media such as CD, DVD or USB come later. And your installer knows fine which device it is running from. I don't know whether you are trolling, or if you've got so hung up in an imagined "better way" that you are making a mountain out of a molehill. But this is not a problem for anyone else.
 
> There is good reason why these are all labelled "sd" these days - they > are all part of the same subsystem and are thus treated the same, with > all the advantages that stem from that.
PATA and SATA drivers are separated from USB MSD. There is no reason for them to be named the same.
> Hard disks on SATA get enumerated first -
I have instances where the SATA drive got initialized after the UMSD. UMSD is already initalized because it is the boot drive.
> installation media such as CD, DVD or USB come later. And your > installer knows fine which device it is running from.
CD/DVD are named /dev/cdrom, not /dev/sd*