LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-12-2016, 01:26 PM   #16
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242

Quote:
Originally Posted by Higgsboson View Post
I have looked at grub.cfg and the UUID matches with the OS.

I did a search on the error message ubuntuforums.org and came across this: 'One is error in partition table which causes grub to fail on search to find correct partition to boot from and very large / (root) partition'.

The usb has only one partition which is /root. And it's 16gb in size.
Maybe I should have the root partition smaller or maybe a separate boot partition?
naaaa I donno, a REG install of Linux with split / and /home I have my root partition set to way bigger then 16GB. but, if I can install a full linux on a 32GB USB stick all using / then you can too.



what Linux are you actually using?

try it with VOID Linux (if you want to) one of your choice by the same steps, if you have time, just to see if that distro will work, because I tired it with Debian myself after I did VOID .. Debian gave me crap, so I just pitched that idea into the void of space.
 
Old 11-12-2016, 01:51 PM   #17
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,345

Rep: Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588
go here https://sourceforge.net/projects/bootinfoscript/ download info script run and post results.
 
Old 11-12-2016, 02:16 PM   #18
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by colorpurple21859 View Post
go here https://sourceforge.net/projects/bootinfoscript/ download info script run and post results.
I have installed boot-info-script from the debian repos.
How do I run it?

I've since found it is a bash script but I can't where it's placed on my debian os.

I've downloaded boot-info-script from sourceforge and extracted the tar.gz.
I now have a boot-info-script folder. The bash script is in the folder.

After reading a load of crap on the net, the command is 'bash bootinfoscript'.

Last edited by Higgsboson; 11-12-2016 at 02:41 PM.
 
Old 11-12-2016, 02:49 PM   #19
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
The output is:

Code:
                   Boot Info Script 0.61      [1 April 2012]


============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    in partition 135 for .
 => No boot loader is installed in the MBR of /dev/sdf.

sda1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files:        /bootmgr /Boot/BCD /Windows/System32/winload.exe /ntldr

sda2: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Debian GNU/Linux 8
    Boot files:        /boot/grub/grub.cfg /etc/fstab

sda3: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info: 

sda5: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sda6: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sda7: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Debian GNU/Linux 8
    Boot files:        /boot/grub/grub.cfg /etc/fstab

sda4: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Debian GNU/Linux 8
    Boot files:        /boot/grub/grub.cfg /etc/fstab

sdf1: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Debian GNU/Linux 8
    Boot files:        /boot/grub/grub.cfg /etc/fstab

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 931.5 GiB, 1000200658432 bytes, 1953516911 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1    *             63   335,546,367   335,546,305   7 NTFS / exFAT / HPFS
/dev/sda2         335,546,368   367,003,647    31,457,280  83 Linux
/dev/sda3         576,720,894 1,938,835,455 1,362,114,562   5 Extended
/dev/sda5         576,720,896   681,578,495   104,857,600  83 Linux
/dev/sda6       1,905,281,024 1,938,835,455    33,554,432  82 Linux swap / Solaris
/dev/sda7         681,580,544   974,546,943   292,966,400  83 Linux
/dev/sda4         367,003,648   576,718,847   209,715,200  83 Linux


Drive: sdf _____________________________________________________________________

Disk /dev/sdf: 14.3 GiB, 15376000000 bytes, 30031250 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdf1               2,048    30,029,823    30,027,776  83 Linux


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        BCC04A84C04A44BC                       ntfs       win7
/dev/sda2        b2412934-12d8-494f-bdf7-399c5d95098d   ext4       frida
/dev/sda4        fc9186ab-b5c7-4a95-8a8a-84dcab4c73f1   ext4       chika
/dev/sda5        90fff6c0-e34e-4d2a-9e73-c259c70164d6   ext4       safehouse
/dev/sda6        74b1ccd7-91b1-40ac-87ae-2c3322a2ea72   swap       swap
/dev/sda7        781c8027-3eeb-48b0-ae2a-69bf23ce7bf8   ext4       
/dev/sdf1        8ae2c558-e3de-4197-8fa6-da21cd14c22a   ext4       
/dev/sr0         2002-07-28-00-36-00-00                 udf        NEW

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda7        /                        ext4       (rw,relatime,errors=remount-ro,data=ordered)
/dev/sdf1        /media/yayoi/8ae2c558-e3de-4197-8fa6-da21cd14c22a ext4       (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
/dev/sr0         /media/cdrom0            udf        (ro,nosuid,nodev,noexec,relatime,utf8,user)



=============================== sdf1/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb1 during installation
UUID=8ae2c558-e3de-4197-8fa6-da21cd14c22a /               ext4    errors=remount-ro 0       1
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
--------------------------------------------------------------------------------

=================== sdf1: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)


========= Devices which don't seem to have a corresponding hard drive: =========

sdb sdc sdd sde 

=============================== StdErr Messages: ===============================

cat: /tmp/BootInfo-P6hc1x67/Tmp_Log: No such file or directory
cat: /tmp/BootInfo-P6hc1x67/Tmp_Log: No such file or directory
cat: /tmp/BootInfo-P6hc1x67/Tmp_Log: No such file or directory
cat: /tmp/BootInfo-P6hc1x67/Tmp_Log: No such file or directory
I've provided the first bit and the last bit about sdf1 which is the usb.
 
Old 11-12-2016, 03:12 PM   #20
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
did you give him your USB Stick os too?
 
Old 11-12-2016, 03:41 PM   #21
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by BW-userx View Post
did you give him your USB Stick os too?
Yes, the usb stick info is sdf1.
The OS is debian jessie and the kernel is Linux 3.16.0-4-amd64.

I'm wondering if I should have a seperate boot partition. The boot partition will never change so it doesn't matter if I assign a small space on the usb for it.

I don't get it. If someone is installing debian to an external SSD hard drive with usb cable - then surely they'll face the same problem?

Last edited by Higgsboson; 11-12-2016 at 03:59 PM.
 
Old 11-12-2016, 04:22 PM   #22
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Your bootinfoscript output shows Grub code in the MBR of sda (1TB drive) and nothing in the MBR of sdf, your 16GB drive. If you tried installing Grub to the MBR of sdf, it obviously didn't work unless you have run it after the bootinfoscript?? In that situation, the only way you could boot the system on the flash drive is to put a menuentry in the grub.cfg file on the 1TB drive with Debian or install Grub to the MBR of sdf with a proper entry. Your bootinfoscript does not show a grub.cfg file for either system so we are left guess.

A separate boot partition is not going to resolve your problem. You might try downloading and running boot repair from the site below and burning it to a CD and booting. Select the option to Create BootInfo Summary and post a link here. It will show a lot more info which should help.
 
1 members found this post helpful.
Old 11-12-2016, 04:55 PM   #23
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Quote:
Originally Posted by Higgsboson View Post
Does this mean taking it out and putting it in again while there is a message saying the OS is loading?
Do not remove the device while the PC is powered up. Turn off, remove, reseat. Anyway, that doesn't seems to be your problem now.

Run the boot repair disc as yaneck suggests. If you don't have a spare drive to try that:

Boot your regular Linux installation as it seems you have one.

Mount the USB drive to the location of choice, I'm going to go with your /dev/sdf from before but it is your responsibility to check it.

Run, as root:
Code:
grub-install --target=i386-pc --debug --boot-directory=<mount point>/usb/boot <device name>
so, for example, if you mounted the drive, /dev/sdf at /mnt/usb:

Code:
grub-install --target=i386-pc --debug --boot-directory=/mnt/usb/boot /dev/sdf
Now be warned, things get a bit involved.

Code:
chroot /mnt/usb
grub-mkconfig -o /boot/grub/grub.cfg
If you get errors about device nodes not being found, you'll have to exit the chroot environment (type "exit", hit enter), then give it devices

Code:
mount -o /dev /mnt/usb/dev
chroot /mnt/usb
grub-mkconfig -o /boot/grub/grub.cfg
exit
umount /mnt/usb/dev
And hopefully at this point, barring any other problems, your USB drive will boot.
 
Old 11-12-2016, 05:18 PM   #24
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by yancek View Post
Your bootinfoscript output shows Grub code in the MBR of sda (1TB drive) and nothing in the MBR of sdf, your 16GB drive. If you tried installing Grub to the MBR of sdf, it obviously didn't work unless you have run it after the bootinfoscript??
I see. So grub has not installed to the mbr of sdf?
That's unusual because I'm pretty certain I chose to install grub to sdf.

Is there a way of installing grub to the mbr of sdf after installation?
Can I use the chmod option to add grub to the mbr of sdf?
Why the hell has grub not installed to the mbr of sdf?

Quote:
In that situation, the only way you could boot the system on the flash drive is to put a menuentry in the grub.cfg file on the 1TB drive with Debian or install Grub to the MBR of sdf with a proper entry.
I prefer the latter option.
The whole point of linux-on-flash-drive is you can open the OS on other computers.
Please can you say how I can add Grub to the MBR of sdf?

Quote:
Your bootinfoscript does not show a grub.cfg file for either system so we are left guess.
The bootinfoscript is too big for a single post. I can submit the bit you refer to - I just don't know where it is.

Quote:
A separate boot partition is not going to resolve your problem. You might try downloading and running boot repair from the site below and burning it to a CD and booting. Select the option to Create BootInfo Summary and post a link here. It will show a lot more info which should help.
Well clearly this means we are unclear what the problem is.
I am installing full debian jessie (not live) onto flash drive (which presumably is the same as an external SSD with usb cable) - and it's not happening.

Where are all the people who have installed debian onto an SSD via a usb port?
Or is this purely a flash drive issue?
 
Old 11-12-2016, 05:27 PM   #25
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
read post #23 to chroot

....

try dd if=/dev/zero of=/dev/sdx bs=1024 count=1 ...

your USB MBR isn't taking it needs to be cleaned out. dd a big chunk of it
it is Debian ... go figure ...

don't be shy, try a different distro get to know it, if all you want/need is a separate Linux carry out to use in other laptops/desktops
 
Old 11-12-2016, 05:49 PM   #26
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Quote:
Originally Posted by Higgsboson View Post
Is there a way of installing grub to the mbr of sdf after installation?
Can I use the chmod option to add grub to the mbr of sdf?
Why the hell has grub not installed to the mbr of sdf?

...snip...

Where are all the people who have installed debian onto an SSD via a usb port?
Or is this purely a flash drive issue?
I gave you instructions for installing grub yourself to your flash drive, should you choose to follow them.

Apparently you did not install grub to the flash drive properly during installation, as it is not there according to the boot info output you gave us. In your first post, you mentioned sda.

Edit:

Forgive me as it's been a while, but I just remembered that the Debian team has taken care of the chroot step for you. Boot your Debian installer CD/flash drive and select Rescue mode from the menu. It will then allow you to choose a device as the root device. Do so, and it will drop you into a chrooted environment. Make note of the device name, in case it has changed. Now, you just have to:

Code:
grub-install --debug /dev/sdf
grub-mkconfig -o /boot/grub/grub.cfg
Replace sdf with the device name, if applicable.

Last edited by goumba; 11-12-2016 at 06:09 PM.
 
1 members found this post helpful.
Old 11-12-2016, 06:06 PM   #27
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by goumba View Post
Boot your regular Linux installation as it seems you have one.
Mount the USB drive to the location of choice, I'm going to go with your /dev/sdf from before but it is your responsibility to check it.

Run, as root:
Code:
grub-install --target=i386-pc --debug --boot-directory=<mount point>/usb/boot <device name>
so, for example, if you mounted the drive, /dev/sdf at /mnt/usb:

Code:
grub-install --target=i386-pc --debug --boot-directory=/mnt/usb/boot /dev/sdf
Yes, but i386 sounds like 32-bit and I have a 64-bit processor.
Is there an issue with my processor? I can get a new one.

Quote:
Now be warned, things get a bit involved.

Code:
chroot /mnt/usb
grub-mkconfig -o /boot/grub/grub.cfg
Ok, so what is going on here?
 
Old 11-12-2016, 06:16 PM   #28
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
Quote:
Originally Posted by Higgsboson View Post
Yes, but i386 sounds like 32-bit and I have a 64-bit processor.
Is there an issue with my processor? I can get a new one.
No, it has to do with BIOS rather than EFI, as far as I can tell.

Quote:
Ok, so what is going on here?
Apparently I edited my post as you replied, see my post again. As it is similar, I'll explain. chroot is allowing you basically to enter that installation without having booted into it, to do some limited tasks. As I stated above, the Debian team has taken care of this part for you.

grub-install installs the necessary support files for grub to work.
grub-mkconfig rebuilds the configuration file, and places it in /boot where grub can find it.
 
Old 11-12-2016, 06:44 PM   #29
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
grub-install with target i386-pc in 64bit machine
 
Old 11-12-2016, 06:47 PM   #30
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by Higgsboson View Post
Yes, but i386 sounds like 32-bit and I have a 64-bit processor.
Is there an issue with my processor? I can get a new one.

Quote:
chroot /mnt/usb
grub-mkconfig -o /boot/grub/grub.cfg

Ok, so what is going on here?
1. you're changing root to your USB mounted in /mnt/usb directroy
2. that second line is commands to have grub make a config file to your usb stick and create it in the /boot/grub directory on your USB Stick due to chroot /mnt/usb
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Debian USB Install: "No Boot Sector on USB Device" on laptop juju Debian 8 04-24-2015 04:29 PM
Debian USB install kushalkoolwal Debian 2 01-25-2009 06:33 PM
install usb printer in debian hellpos Linux - Hardware 0 08-03-2004 08:40 AM
How to install Debian from a USB CDROM kkempter Linux - Software 0 12-11-2003 08:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration