Just checking if installation script support native G drive install? Or I am pretty much left to perform the manual partition/format/copy/edit

viewtopic.php?t=779&highlight=native+install
Cheers
If the start of your 1st partition is sector is 268435456, then you have a 256mb partition then shouldent your next partition start at 268959744 as this is the start point plus 256mb.then you need the code for fdiskCode:
fdisk -u /dev/hda
n
p
1
268435456
+256M
n
p
2
268935457
<just hit enter her for default>
t
1
82
a
2
w
keg188 wrote:After doing a little bit of checking i sort of have an issue with the commands nobspangle gives to to setup the partitions (I'm probably wronge and will probably get a good flaming for it but..)
If the start of your 1st partition is sector is 268435456, then you have a 256mb partition then shouldent your next partition start at 268959744 as this is the start point plus 256mb.then you need the code for fdiskCode:
fdisk -u /dev/hda
n
p
1
268435456
+256M
n
p
2
268935457
<just hit enter her for default>
t
1
82
a
2
w
Can someone clear this up as i am interested in filling the rest of my drive with Gentoox Native style.
Code: Select all
fdisk -u -l /dev/hda | grep /dev/hda1 | awk -F' ' '{ print $3; }'
Code: Select all
#cd /tmp
#col -b < disk.swap > disk.swap1; mv disk.swap1 disk.swap
#col -b < disk.root > disk.root1; mv disk.root1 disk.root
#col -b < make.partition.sh > make.partition.sh1; mv make.partition.sh1 make.partition.sh
#col -b < update.initrd.sh > update.initrd.sh1; mv update.initrd.sh1 update.initrd.sh
#col -b < xfer.content.sh > xfer.content.sh1; mv xfer.content.sh1 xfer.content.sh
#col -b < update.fstab.sh > update.fstab.sh1; mv update.fstab.sh1 update.fstab.sh
Code: Select all
#chmod 755 make.partition.sh
#chmod 755 update.initrd.sh
#chmod 755 xfer.content.sh
#chmod 755 update.fstab.sh
Code: Select all
#./make.partition.sh
Code: Select all
#./xfer.content.sh
Code: Select all
#./update.initrd.sh
Code: Select all
#./update.fstab.sh
Code: Select all
n
p
1
@START@
@SIZE@
t
82
w
Code: Select all
n
p
2
@START@
@SIZE@
a
2
w
Code: Select all
#!/bin/bash
###
# Settings for fdisk when making swap, then root partitions
###
DISKSWAP=/tmp/disk.swap
DISKROOT=/tmp/disk.root
DEVICE="/dev/hda"
###
# Start block for the end of the standard 137gb hdd
###
START=268435456
SWAPSIZE="+256M"
###
# Options for deleting all possible partitions from the drive
###
echo -e "d\n1\nd\n2\nd\n10\nd\n9\nd\n8\nd\n7\nd\n6\nd\n5\nd\n3\nd\n4\nw" > /tmp/make.disk
###
# Zero out the partition table
###
echo "(1/5) Zeroing partition table ..."
dd if=/dev/zero of=/dev/hda seek=$START bs=512 count=1 > /dev/null 2>&1
fdisk $DEVICE < /tmp/make.disk > /dev/null 2>&1
###
# Get the information needed to make the swap partition
###
echo "(2/5) Creating swap partition as /dev/hda1 ..."
sed -e "s/@SIZE@/$SWAPSIZE/g" -e "s/@START@/$START/g" < $DISKSWAP > /tmp/make.disk
fdisk -u $DEVICE < /tmp/make.disk > /dev/null 2>&1
rm -f /tmp/make.disk
###
# Get the information needed to make the root partition
###
echo "(3/5) Creating root partition as /dev/hda2 ..."
START=`fdisk -u -l ${DEVICE} | grep ${DEVICE}1 | awk -F' ' '{ print $3; }'`
START=`expr $START + 1`
sed -e "s/@SIZE@//g" -e "s/@START@/$START/g" < $DISKROOT > /tmp/make.disk
fdisk -u $DEVICE < /tmp/make.disk > /dev/null 2>&1
rm -f /tmp/make.disk
###
# Initialize the swap partition
###
echo "(4/5) Initialize swap partition ..."
mkswap /dev/ide/host0/bus0/target0/lun0/part1 1> /dev/null 2> /dev/null
if [ $? != "0" ]; then
/bin/led rxrx
clear
echo "An error occurred, halting"
echo "[Error making swap]"
exit
fi
###
# Format the root partition
###
echo "(5/5) Format root partition ..."
yes | /sbin/mkreiserfs /dev/ide/host0/bus0/target0/lun0/part2 1> /dev/null 2> /dev/null
if [ $? != "0" ]; then
/bin/led rxrx
clear
echo "An error occurred, halting"
echo "[Error making root filesystem]"
exit
fi
echo "Done ..."
Code: Select all
#!/bin/bash
#####################
# Transfer partition content from rootfs to new hda2
#####################
echo "(1/3) Mounting partition..."
# mount the new hda2
mkdir /mnt/hda2
mount -t reiserfs /dev/hda2 /mnt/hda2
# mount the current rootfs as loopback
mkdir /mnt/rootfs
mount -o loop /mnt/fatx/e/rootfs /mnt/rootfs
# copy from rootfs to hda2
echo "(2/3) Start copying content. This should take approximately 5-10 minutes..."
cp -ax /mnt/rootfs/* /mnt/hda2/
# check filecount
cd /mnt/rootfs
TOTAL1=`find . -type f -print | wc -l`
cd /mnt/hda2
TOTAL2=`find . -type f -print | wc -l`
echo "Total file count in rootfs : $TOTAL1"
echo "Total file count in hda2 : $TOTAL2"
# clean up
echo "(3/3) Cleaning up..."
cd /mnt
umount hda2
rmdir hda2
umount rootfs
rmdir rootfs
echo "Done..."
Code: Select all
#!/bin/bash
######################
echo "(1/3) Mounting initrd.gz ..."
#####################
# Copy out the initrd.gz
cp /mnt/fatx/e/initrd.gz /tmp
# Unzip it
gunzip /tmp/initrd.gz
# Mount as loopback
mkdir /mnt/initrd
mount -o loop /tmp/initrd /mnt/initrd
######################
echo "(2/3) Updating linuxrc ..."
#####################
# Update linuxrc to boot from part2
cd /mnt/initrd
# comment out mounting of e drive
sed -e "s~mount -t fatx /dev/ide/host0/bus0/target0/lun0/part50 /cdrom~#mount -t fatx /dev/ide/host0/bus0/target0/lun0/part50 /cdrom~" < linuxrc > linuxrc1
# comment out mounting of rootfs from e drive
# add mount rootfs directly from hda2
sed -e "s~mount -o loop /cdrom/rootfs /ram~#mount -o loop /cdrom/rootfs /ram\nmount -t reiserfs /dev/ide/host0/bus0/target0/lun0/part2 /ram~" < linuxrc1 > linuxrc
rm linuxrc1
cd /
######################
echo "(3/3) Zip back new initrd.gz ..."
#####################
# Umount so we can zip it again
umount /mnt/initrd
# Zip it back
gzip /tmp/initrd
# Back up original initrd.gz
mv /mnt/fatx/e/initrd.gz /mnt/fatx/e/oldinitrd.gz
# Copy in the new initrd.gz
mv /tmp/initrd.gz /mnt/fatx/e
# Cleanup
rmdir /mnt/initrd
######################
echo "Original initrd.gz renamed to oldinitrd.gz."
echo "Done ..."
#####################
Code: Select all
#!/bin/bash
#####################
# Update the new fstab to boot from hda2 and use hda1 as swap
#####################
# mount the new hda2
mkdir /mnt/hda2
mount -t reiserfs /dev/hda2 /mnt/hda2
cd /mnt/hda2/etc
# replace original /dev/loop/0 with /dev/hda2
sed -e "s~/dev/loop/0[ \t]*/[ \t]*reiserfs[ \t]*defaults,errors=remount-ro[ \t]*0[ \t]*1~\n#/dev/loop/0 / reiserfs defaults,errors=remount-ro 0 1\n/dev/hda2 / reiserfs defaults,errors=remount-ro 0 1\n~" < fstab > fstab1
# replace original swap on fatx/e/swap with /dev/hda1
sed -e "s~/mnt/fatx/e/swap[ \t]*none[ \t]*swap[ \t]*sw[ \t]*0[ \t]*0~\n#/mnt/fatx/e/swap none swap sw 0 0\n/dev/hda1 none swap sw 0 0\n~" < fstab1 > fstab
rm fstab1
# clean up
cd /mnt
umount hda2
rmdir hda2
######################
echo "fstab in /dev/hda2 updated."
echo "Gentoox will use new partition after reboot."
#####################
there should be "/mnt/fatx/e/rootfs" since we have installed it on "E"mount -o loop /mnt/fatx/f/rootfs /mnt/rootfs
Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 268435456 268935456 250000+ 82 Linux swap
/dev/hda2 * 268935457 312581807 21823175+ 83 Linux
/dev/hda3 63 268435455 134217696+ 83 Linux
Users browsing this forum: No registered users and 1 guest