[Klug-general] Setting Boot Flag
Karl Lattimer
karl at qdh.org.uk
Tue Mar 4 15:55:24 GMT 2008
On Tue, 2008-03-04 at 15:52 +0000, Andrew Miller (Spode) wrote:
> I'm using BusyBox, so scripting for sh compatibility.
>
> Thanks for steering me in the right direction here. Is there a way of
> putting the script into a variable and inputting that instead of having
> to use an interim file? As far as I can see fdisk < input.script will
> only work with a real file..
urgh, something like this perhaps...
cat > /tmp/setboot.fdisk << EOF
a
1
EOF
fdisk /dev/sdx < /tmp/setboot.fdisk
rm -f /tmp/setboot.fdisk
K,
> Spode
>
> Karl Lattimer wrote:
> > On Tue, 2008-03-04 at 15:13 +0000, Andrew Miller (Spode) wrote:
> >
> >> Hello,
> >>
> >> Bit stuck here, and hoping someone has the information stuck in their
> >> heads somewhere. Been Googling for a good hour.
> >>
> >> In a Linux script I'm writing, I need it to be able to set the boot flag
> >> on a partition. Which means no interactivity. I know how I could do this
> >> with parted, but the minimal distro I'm using doesn't have it standard.
> >> I have fdisk and mkfs.ext3.
> >>
> >> Any ideas?
> >>
> >
> > create an fdisk script
> >
> > ===== script file =====
> > #!/bin/fdisk /dev/disk
> > a
> > 1
> > =======================
> >
> > Or something to that effect.
> >
> > K,
> >
> >
> > _______________________________________________
> > Kent mailing list
> > Kent at mailman.lug.org.uk
> > https://mailman.lug.org.uk/mailman/listinfo/kent
> >
> >
>
>
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/kent
More information about the Kent
mailing list